0
零計數

Sitecore的回報場「場」在SocialProfiles零計數,但社交網絡在這個領域確實存在。我如何獲得需要的領域?Sitecore的回場「場」在SocialProfiles

var socialProfileManager = new SocialProfileManager(); 
    var twitterNetwork = allProfiles.FirstOrDefault(x => x.NetworkName == "Twitter"); 
    if (twitterNetwork.Fields.Count != 0) //Dicitionary "Fields" is empty here 
    { 
     ... 
    } 

回答

0

我有一個類似的情況,我試圖檢索字段並處理零字段計數。看看這篇文章:https://stackoverflow.com/a/30519345/4897782

具體而言,當我通過假爲基礎登錄方法的第二個參數我的問題就解決了。默認的真實參數嘗試異步更新的姿態,使其無法在我嘗試做你正在做的事情。

爲了能夠雖然覆蓋參數,我不得不從標準偏離開箱登錄控件的,當你點擊登錄實現自己發生了什麼版本。這很簡單。看看帖子,希望能解決您的問題。