public void IssuedTokenAcquiring(
     VssTraceActivity activity,
     IssuedTokenProvider provider)
 {
     if (IsEnabled())
     {
         SetActivityId(activity);
         IssuedTokenAcquiring(provider.CredentialType, provider.GetHashCode());
     }
 }
 internal void IssuedTokenProviderPromptRequired(
     VssTraceActivity activity,
     IssuedTokenProvider provider)
 {
     if (IsEnabled())
     {
         SetActivityId(activity);
         IssuedTokenProviderPromptRequired(provider.CredentialType, provider.GetHashCode());
     }
 }
 public void IssuedTokenProviderRemoved(
     VssTraceActivity activity,
     IssuedTokenProvider provider)
 {
     if (IsEnabled())
     {
         SetActivityId(activity);
         IssuedTokenProviderRemoved(provider.CredentialType, provider.GetHashCode(), provider.GetAuthenticationParameters());
     }
 }
 public void AuthenticationError(
     VssTraceActivity activity,
     IssuedTokenProvider provider,
     String message)
 {
     if (IsEnabled(EventLevel.Error, Keywords.Authentication))
     {
         SetActivityId(activity);
         WriteMessageEvent(provider.CredentialType, provider.GetHashCode(), message, this.AuthenticationError);
     }
 }
 public void IssuedTokenRetrievedFromCache(
     VssTraceActivity activity,
     IssuedTokenProvider provider,
     IssuedToken token)
 {
     if (IsEnabled())
     {
         SetActivityId(activity);
         IssuedTokenRetrievedFromCache(provider.CredentialType, provider.GetHashCode(), token.GetHashCode());
     }
 }
 public void IssuedTokenValidated(
     VssTraceActivity activity,
     IssuedTokenProvider provider,
     IssuedToken token)
 {
     if (IsEnabled())
     {
         SetActivityId(activity);
         IssuedTokenValidated(provider.CredentialType, provider.GetHashCode(), token.GetHashCode());
     }
 }
 public void IssuedTokenWaitStop(
     VssTraceActivity activity,
     IssuedTokenProvider provider,
     IssuedToken token)
 {
     if (IsEnabled(EventLevel.Verbose, Keywords.Authentication))
     {
         SetActivityId(activity);
         IssuedTokenWaitStop(provider.CredentialType, provider.GetHashCode(), token != null ? token.GetHashCode() : 0);
     }
 }
 public void IssuedTokenWaitStart(
     VssTraceActivity activity,
     IssuedTokenProvider provider,
     Guid waitForActivityId)
 {
     if (IsEnabled(EventLevel.Verbose, Keywords.Authentication))
     {
         SetActivityId(activity);
         IssuedTokenWaitStart(provider.CredentialType, provider.GetHashCode(), waitForActivityId);
     }
 }
        internal static IssuedTokenProviderWrapper GetInstance()
        {
            IssuedTokenProvider real = default(IssuedTokenProvider);

            RealInstanceFactory(ref real);
            var instance = (IssuedTokenProviderWrapper)IssuedTokenProviderWrapper.GetWrapper(real);

            InstanceFactory(ref instance);
            if (instance == null)
            {
                Assert.Inconclusive("Could not Create Test Instance");
            }
            return(instance);
        }
        public void AuthenticationError(
            VssTraceActivity activity,
            IssuedTokenProvider provider,
            Exception exception)
        {
            if (IsEnabled(EventLevel.Error, Keywords.Authentication))
            {
                if (exception is AggregateException)
                {
                    exception = ((AggregateException)exception).Flatten().InnerException;
                }

                AuthenticationError(activity, provider, exception.ToString());
            }
        }
Esempio n. 11
0
 static partial void RealInstanceFactory(ref IssuedTokenProvider real, string callerName)
 {
     real = (TemporaryMock)FormatterServices.GetUninitializedObject(typeof(TemporaryMock));
 }
 static partial void RealInstanceFactory(ref IssuedTokenProvider real, [CallerMemberName] string callerName        = "");