예제 #1
0
 public CachedTransport(string email, ITransport innerTranport)
 {
     userCacheService = new CacheService(email);
     commonCacheService = new CacheService();
     this.innerTranport = innerTranport;
     this.innerTranport.Throttled += instance_Throttled;
 }
예제 #2
0
        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;
        }