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>()); }
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); }
static partial void RealInstanceFactory(ref FederatedCredential real, [CallerMemberName] string callerName = "");