Ejemplo n.º 1
0
        public static T GetClient <T>(string accountUrl, string apiKey, bool useSsl = true)
            where T : VssHttpClientBase
        {
            var accountUri = new Uri(accountUrl);

            FederatedCredential credential = useSsl
                ? (FederatedCredential) new VssBasicCredential(null, apiKey)
                : new VssNonSslBasicCredential(null, apiKey);
            var connection = new VssConnection(accountUri, credential);

            return(connection.GetClient <T>());
        }
Ejemplo n.º 2
0
        internal static FederatedCredentialWrapper GetInstance()
        {
            FederatedCredential real = default(FederatedCredential);

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

            InstanceFactory(ref instance);
            if (instance == null)
            {
                Assert.Inconclusive("Could not Create Test Instance");
            }
            return(instance);
        }
Ejemplo n.º 3
0
 static partial void RealInstanceFactory(ref FederatedCredential real, [CallerMemberName] string callerName = "");