public HealthRepository(IUriProvider clusterUri) { if (clusterUri == null || clusterUri.Uri == null) throw new ArgumentNullException("clusterUri", "Cluster uri is required for the Health Repository."); _ClusterUri = new Uri(clusterUri.Uri.GetLeftPart(UriPartial.Authority)); }
public LinkJsonConverter(IUriProvider uriProvider) { if (uriProvider == null) { throw new ArgumentNullException("uriProvider"); } _uriProvider = uriProvider; }
public AliasRepository(IUriProvider clusterUri, bool afterVersion_0_90_1 = true) { if (clusterUri == null || clusterUri.Uri == null) throw new ArgumentNullException("clusterUri", "Cluster Uri is required."); _ClusterUri = clusterUri.Uri; _AfterVersion_0_90_1 = afterVersion_0_90_1; }
public StateRepository(IUriProvider clusterUri, IHttpLayer httpLayer) { if (clusterUri == null || clusterUri.Uri == null) throw new ArgumentNullException("clusterUri", "Cluster uri is required for the Cluster State Repository."); _clusterUri = clusterUri; _httpLayer = httpLayer; }
public AnalyzeRepository(IUriProvider clusterUri, IHttpLayer httpLayer) { if (clusterUri == null || clusterUri.Uri == null) throw new ArgumentNullException("clusterUri", "The analyze repository requires a uri provider for the elastic cluster."); _ClusterUri = clusterUri.Uri; _httpLayer = httpLayer; }
public SettingsRepository(IUriProvider clusterUri, IHttpLayer httpLayer) { if (clusterUri == null || clusterUri.Uri == null) throw new ArgumentNullException("clusterUri", "Cluster uri is required for the Settings Repository."); _ClusterUri = new Uri(clusterUri.Uri.GetLeftPart(UriPartial.Authority)); _httpLayer = httpLayer; }
public MappingRepository(IUriProvider clusterUri, ISettingsRepository settingsRepository, IHttpLayer httpLayer) { if (clusterUri == null || clusterUri.Uri == null) throw new ArgumentNullException("clusterUri", "The mapping repository requires a uri provider for the elastic cluster."); _ClusterUri = clusterUri.Uri; _httpLayer = httpLayer; _SettingsRepository = settingsRepository; }
public DataSampleHeader() { Key = Guid.NewGuid().ToString(); Created = DateTime.UtcNow; Modified = DateTime.UtcNow; Summary = new SampleSummary(); Metadata = new DataSampleMetadata(); _uriProvider = new UriProvider(); }
/// <summary> /// Enables services to be resolved a WCF service proxies. /// </summary> /// <param name="serviceRegistery">The target <see cref="IServiceRegistry"/>.</param> /// <param name="uriProvider">The <see cref="IUriProvider"/> that is responsible /// for providing an <see cref="Uri"/> that represents the service endpoint address.</param> internal static void EnableWcfClient(this IServiceRegistry serviceRegistery, IUriProvider uriProvider) { serviceRegistery.RegisterFallback( (serviceType, serviceName) => serviceType.IsDefined(typeof(ServiceContractAttribute), true), CreateWcfProxy); serviceRegistery.Register <IBindingProvider, BindingProvider>(new PerContainerLifetime()); serviceRegistery.RegisterInstance(uriProvider); serviceRegistery.Register <IChannelProvider, ChannelProvider>(new PerContainerLifetime()); serviceRegistery.Register <IChannelFactoryProvider, ChannelFactoryProvider>(new PerContainerLifetime()); serviceRegistery.Register <IServiceProxyFactory, ServiceProxyFactory>(new PerContainerLifetime()); serviceRegistery.Register <IServiceProxyTypeFactory, ServiceProxyTypeFactory>(new PerContainerLifetime()); serviceRegistery.Register <IServiceClient, ServiceClient>(); serviceRegistery.Decorate <IChannelFactoryProvider, ChannelFactoryProviderCacheDecorator>(); }
public DataItem(IUriProvider uriProvider = null) { _uriProvider = uriProvider ?? new UriProvider(); Key = Guid.NewGuid().ToString(); Item = new object(); }
public StructuredUrlTester(IUriProvider provider) { Uri uri = provider.Current; // Test the value of uri.Host and extract parts via regex }
/// <summary> /// Initializes a new instance of the <see cref="BindingProvider"/> class. /// </summary> /// <param name="uriProvider">The <see cref="IUriProvider"/> that is responsible /// for providing the uri scheme.</param> public BindingProvider(IUriProvider uriProvider) { this.uriProvider = uriProvider; }
/// <summary> /// Initializes a new instance of the <see cref="ChannelFactoryProvider"/> class. /// </summary> /// <param name="bindingProvider">The <see cref="IBindingProvider"/> that is responsible /// for providing a <see cref="Binding"/> to the <see cref="ChannelFactory{TChannel}"/>.</param> /// <param name="uriProvider">The <see cref="IUriProvider"/> that is responsible for /// providing an <see cref="Uri"/> that represents the service endpoint address.</param> /// <param name="endpointBehaviors">A list of <see cref="IEndpointBehavior"/> instances.</param> public ChannelFactoryProvider(IBindingProvider bindingProvider, IUriProvider uriProvider, IEnumerable <IEndpointBehavior> endpointBehaviors) { this.bindingProvider = bindingProvider; this.uriProvider = uriProvider; this.endpointBehaviors = endpointBehaviors; }
public HackernewsClientTest() { uriProvider = Substitute.For <IUriProvider>(); httpClientFactory = Substitute.For <IHttpClientFactory>(); configuration = Substitute.For <IConfiguration>(); }
public HackernewsClient(IHttpClientFactory httpClientFactory, IUriProvider uriProvider, IMapper mapper) { this.httpClientFactory = httpClientFactory; this.uriProvider = uriProvider; this.mapper = mapper; }
public DiscoveryClient(IUriProvider urlProvider) { Provider = urlProvider; }