public ServiceFabricStartupFilter(ServiceFabricOptions options) { if (options == null) { throw new ArgumentNullException(nameof(options)); } _options = options; }
private static AspNetCoreCommunicationContext CreateAspNetCoreCommunicationContext(string[] args) { var options = new ServiceFabricOptions() { EndpointName = "GatewayTypeEndpoint" }; var webHost = new WebHostBuilder().UseDefaultConfiguration(args) .UseStartup <Startup>() .UseServer("Microsoft.AspNetCore.Server.Kestrel") .UseServiceFabric(options) .Build(); return(new AspNetCoreCommunicationContext(webHost, addUrlPrefix: false)); }
public ServiceFabricMiddleware(RequestDelegate next, ServiceFabricOptions options) { if (next == null) { throw new ArgumentNullException(nameof(next)); } if (options == null) { throw new ArgumentNullException(nameof(options)); } _next = next; _options = options; }
private static AspNetCoreCommunicationContext CreateAspNetCoreCommunicationContext(string[] args) { var serviceDescription = new ServiceDescription() { ServiceType = typeof(CounterService), InterfaceTypes = ImmutableArray.Create(typeof(ICounterService)) }; var options = new ServiceFabricOptions() { EndpointName = "CounterTypeEndpoint", ServiceDescriptions = ImmutableArray.Create(serviceDescription) }; var webHost = new WebHostBuilder().UseDefaultConfiguration(args) .UseStartup <Startup>() .UseServer("Microsoft.AspNetCore.Server.Kestrel") .UseServiceFabric(options) .Build(); return(new AspNetCoreCommunicationContext(webHost, addUrlPrefix: true)); }
public ValuesController(IOptionsSnapshot <ServiceFabricOptions> optionsAccessor) { _options = optionsAccessor.Value; }