public void AddApiTelemetryFeature(ApiTelemetryFeature feature, bool isTrue)
        {
            string telemetryEnabled = TelemetryConstants.False;

            if (isTrue)
            {
                telemetryEnabled = TelemetryConstants.True;
            }

            _apiTelemetry[MatsConverter.AsString(feature)] = telemetryEnabled;
        }
        public static string AsString(ApiTelemetryFeature apiTelemetryFeature)
        {
            switch (apiTelemetryFeature)
            {
            case ApiTelemetryFeature.WithAccount:
                return(ApiTelemetryFeatureKey.WithAccount);

            case ApiTelemetryFeature.WithRedirectUri:
                return(ApiTelemetryFeatureKey.WithForceRefresh);

            case ApiTelemetryFeature.WithLoginHint:
                return(ApiTelemetryFeatureKey.WithLoginHint);

            case ApiTelemetryFeature.WithExtraScopesToConsent:
                return(ApiTelemetryFeatureKey.WithExtraScopesToConsent);

            case ApiTelemetryFeature.WithUserAssertion:
                return(ApiTelemetryFeatureKey.WithUserAssertion);

            case ApiTelemetryFeature.WithSendX5C:
                return(ApiTelemetryFeatureKey.WithSendX5C);

            case ApiTelemetryFeature.WithCurrentSynchronizationContext:
                return(ApiTelemetryFeatureKey.WithCurrentSynchronizationContext);

            case ApiTelemetryFeature.WithEmbeddedWebView:
                return(ApiTelemetryFeatureKey.WithEmbeddedWebView);

            case ApiTelemetryFeature.WithParent:
                return(ApiTelemetryFeatureKey.WithParent);

            case ApiTelemetryFeature.WithPrompt:
                return(ApiTelemetryFeatureKey.WithPrompt);

            case ApiTelemetryFeature.WithUsername:
                return(ApiTelemetryFeatureKey.WithUsername);

            case ApiTelemetryFeature.WithClaims:
                return(ApiTelemetryFeatureKey.WithClaims);

            case ApiTelemetryFeature.WithExtraQueryParameters:
                return(ApiTelemetryFeatureKey.WithExtraQueryParameters);

            case ApiTelemetryFeature.WithAuthority:
                return(ApiTelemetryFeatureKey.WithAuthority);

            case ApiTelemetryFeature.WithValidateAuthority:
                return(ApiTelemetryFeatureKey.WithValidateAuthority);

            case ApiTelemetryFeature.WithAdfsAuthority:
                return(ApiTelemetryFeatureKey.WithAdfsAuthority);

            case ApiTelemetryFeature.WithB2CAuthority:
                return(ApiTelemetryFeatureKey.WithB2CAuthority);

            case ApiTelemetryFeature.WithCustomWebUi:
                return(ApiTelemetryFeatureKey.WithCustomWebUi);

            default:
                return(ApiTelemetryFeatureKey.Unknown);
            }
        }
 public void AddApiTelemetryFeature(ApiTelemetryFeature feature)
 {
     _apiTelemetry[MatsConverter.AsString(feature)] = TelemetryConstants.True;
 }
Пример #4
0
 public void AddApiTelemetryFeature(ApiTelemetryFeature feature)
 {
     _apiTelemetry[MatsConverter.AsString(feature)] = "true";
 }