public CachedTransport(string email, ITransport innerTranport) { userCacheService = new CacheService(email); commonCacheService = new CacheService(); this.innerTranport = innerTranport; this.innerTranport.Throttled += instance_Throttled; }
public bool Authenticate(string email, SecureString password, bool offline, bool useSessionID) { if (transport != null) transport.Throttled -= new ThottledEventHandler(instance_Throttled); transport = getTransport(email); cacheService = new CacheService(email); Offline = offline; if (offline) return true; transport.Throttled += new ThottledEventHandler(instance_Throttled); onAuthenticate(POEEventState.BeforeEvent, email); transport.Authenticate(email, password, useSessionID); onAuthenticate(POEEventState.AfterEvent, email); return true; }