コード例 #1
0
 void Utilities_CredentialsRequested(object sender, CredentialEventArgs e)
 {
     CredentialsRequested = true;
     UserCredentials = new Credentials()
                           {
                               UserName = "******",
                               Password = "******",
                               ServiceInformation = e.ServiceInfo
                           };
     Utilities.IfCanAcceptSet(UserCredentials);
 }
コード例 #2
0
 public void CredentialsProvided(Credentials credentials)
 {
     var serviceId = credentials.ServiceInformation.ServiceID;
     var userName = credentials.UserName;
     var normalizedUserName = GetNormalizedUserName(userName);
     var password = credentials.Password;
     if (!_cache.ContainsKey(serviceId))
         _cache[serviceId] = new CachedCredential
                                 {
                                     ServiceId = serviceId,
                                     UserName = normalizedUserName,
                                     Password = password,
                                     IsPasswordCached = credentials.IsPasswordCachingAllowed
                                 };
     SaveCache();
 }
コード例 #3
0
 public string SendMessage(Credentials credentials, string message)
 {
     ProvidedCredentials = credentials;
     MessagesSent++;
     SentMessages.Add(message);
     return "result message";
 }
コード例 #4
0
 public string GetMessages(Credentials credentials)
 {
     ProvidedCredentials = credentials;
     return "[{text:'test message'}]";
 }
コード例 #5
0
 public string GetContacts(Credentials credentials)
 {
     throw new System.NotImplementedException();
 }
コード例 #6
0
 public string GetMessages(Credentials credentials)
 {
     return "result message";
 }
コード例 #7
0
        public void SetCredentials(Credentials credentials)
        {
            _Credentials = credentials;

            if(!String.IsNullOrEmpty(_Credentials.UserName) || _Credentials.Password != null)
                _DataAccess.Login(_Credentials.UserName, _Credentials.Password);
        }
コード例 #8
0
 public void IfCanAcceptSet(Credentials credentials)
 {
     if(_CanAccept(credentials))
         SetCredentials(credentials);
 }
コード例 #9
0
 private static bool _CanAccept(Credentials credentials)
 {
     return credentials.ServiceInformation.ServiceID.Equals(_ServiceInformation.ServiceID);
 }
コード例 #10
0
 public void IfCanAcceptSet(Credentials credentials)
 {
 }
コード例 #11
0
 public bool CanAccept(Credentials credentials)
 {
     return true;
 }
コード例 #12
0
 public void CredentialsProvided(Credentials credentials)
 {
 }
コード例 #13
0
 public void CredentialsProvided(Credentials credentials)
 {
     _CredentialsProvidedObserver.CredentialsProvided(credentials);
 }
コード例 #14
0
ファイル: UnifiedMessenger.cs プロジェクト: jcbozonier/alloy
 /// <summary>
 /// TODO: Need specs that cover the use of this method.
 /// </summary>
 /// <param name="credentials"></param>
 public void CredentialsProvided(Credentials credentials)
 {
     _MessagingServicesProvider.ForEachPlugIn(plugIn=>plugIn.IfCanAcceptSet(credentials));
 }