public void TestSerializedAccount(string val, string hex) { var so = new Serializer(); var st = new SerializedAccount() as ISerializedType; st.Serialize(so, val); Assert.AreEqual(hex, so.ToHex()); }
public SerializedAccount StoreData() { var Storage = new SerializedAccount(); Storage.AccountId = this.Id; Storage.Type = typeof(TelegramPlugin).FullName; // Storage.Data = Name; return(Storage); }
public void RestoreData(SerializedAccount data) { // this.id = data.AccountId; this.Name = data.Data; string sessionKey = Name; var store = new FileSessionStore(); client = new TelegramClient(153480, "b4fe99e13f7820911ad3cd6c12514e7f", store, sessionKey); //var session = store.Load(sessionKey); //user = session.TLUser; }
public void RestoreData(SerializedAccount data) { this.Id = data.AccountId; this.Name = data.Data; }