public GalleryClient GetClient(RecordedDelegatingHandler handler) { var cred = new AnonymousCloudCredentials(); handler.IsPassThrough = true; return(new GalleryClient(cred, new Uri("https://gallery.azure.com")).WithHandler(handler)); }
public static AuthorizationManagementClient Create(IDictionary <string, object> settings) { if (settings == null) { throw new ArgumentNullException("settings"); } AnonymousCloudCredentials credentials = ConfigurationHelper.GetCredentials <AnonymousCloudCredentials>(settings); Uri baseUri = ConfigurationHelper.GetUri(settings, "BaseUri", false); return(baseUri != null ? new AuthorizationManagementClient(credentials, baseUri) : new AuthorizationManagementClient(credentials)); }