public GoogleTalkMessagingService(IGoogleTalkDataAccess dataAccess)
        {
            _DataAccess = dataAccess;

            _CredEventArgs = new CredentialEventArgs()
            {
                ServiceInfo = _ServiceInformation
            };
        }
Пример #2
0
 void Utilities_CredentialsRequested(object sender, CredentialEventArgs e)
 {
     CredentialsRequested = true;
     UserCredentials = new Credentials()
                           {
                               UserName = "******",
                               Password = "******",
                               ServiceInformation = e.ServiceInfo
                           };
     Utilities.IfCanAcceptSet(UserCredentials);
 }
        public GoogleTalkMessagingService()
        {
            _CredEventArgs = new CredentialEventArgs()
                                 {
                                     ServiceInfo = _ServiceInformation
                                 };

            _DataAccess = new GoogleTalkDataAccess();
            _DataAccess.OnMessage += _DataAccess_OnMessage;
            _DataAccess.OnAuthError += _DataAccess_OnAuthError;
        }
 void Utilities_CredentialsRequested(object sender, CredentialEventArgs e)
 {
     CredentialsRequested = true;
 }
Пример #5
0
        void _MessagingService_AuthorizationFailed(object sender, CredentialEventArgs e)
        {
            _RetryOnAuthFailure = _RetryOnAuthFailure ?? new Dictionary<ServiceInformation, bool>();

            if(!_RetryOnAuthFailure.ContainsKey(e.ServiceInfo))
                _RetryOnAuthFailure[e.ServiceInfo] = Interactions.AuthenticationFailedRetryQuery();

            if (!_RetryOnAuthFailure[e.ServiceInfo]) return;

            messagingService_CredentialsRequested(this, e);
        }
Пример #6
0
 void messagingService_CredentialsRequested(object sender, CredentialEventArgs e)
 {
     var credentials = Interactions.GetCredentials(e.ServiceInfo);
     _MessagingService.SetCredentials(credentials);
 }
Пример #7
0
 private void _GetCredentials(object sender, CredentialEventArgs e)
 {
     if (CredentialsRequested != null)
         CredentialsRequested(sender, e);
 }
Пример #8
0
 void service_AuthorizationFailed(object sender, CredentialEventArgs e)
 {
     if (AuthorizationFailed != null)
         AuthorizationFailed(sender, e);
 }