public SocialAccount GetAccount() { var store = AccountStore.Create (); var account = store.FindAccountsForService (Config.TWITTER_SERVICE_ID).FirstOrDefault(); SocialAccount socialAccount = null; if (account != null) { socialAccount = new SocialAccount (account.Username, account.Properties, account.Cookies); } return socialAccount; }
public void Synchronize (SocialAccount socialAccount) { var store = AccountStore.Create (); var account = store.FindAccountsForService (Config.TWITTER_SERVICE_ID).FirstOrDefault(); // merge on unique keys if(account != null && socialAccount != null) { foreach (string key in socialAccount.Properties.Keys) { if(!account.Properties.ContainsKey(key)) { account.Properties.Add (key, socialAccount.Properties [key]); } } } store.Save (account, Config.TWITTER_SERVICE_ID); }
public void Synchronize(SocialAccount socialAccount) { }