示例#1
0
 /// <summary>
 /// Adds remote listener using delegate to create <see cref="IService"/>
 /// </summary>
 public static ServiceFabricHostBuilder <TService, TContext> AddRemotingListener <TService, TContext>(
     this ServiceFabricHostBuilder <TService, TContext> builder,
     string name,
     Func <IServiceProvider, TService, IService> createService,
     FabricTransportRemotingListenerSettings?settings = null)
     where TService : IServiceFabricService <TContext>
     where TContext : ServiceContext =>
 builder.AddServiceListener(p =>
                            new GenericRemotingListenerBuilder <TService>(name, p, createService, settings));
示例#2
0
 private static ServiceFabricHostBuilder <TService, TContext> AddKestrelListener <TStartup, TService, TContext>(
     this ServiceFabricHostBuilder <TService, TContext> builder,
     string name,
     ServiceFabricIntegrationOptions options,
     Action <IWebHostBuilder>?builderExtension = null)
     where TStartup : class
     where TService : IServiceFabricService <TContext>
     where TContext : ServiceContext =>
 builder.AddServiceListener(p => new KestrelListenerBuilder <TStartup, TService, TContext>(
                                name,
                                options,
                                builder => builder.BuilderExtension <TContext>(builderExtension)));
示例#3
0
 /// <summary>
 /// Adds remote listener to stateless service
 /// </summary>
 public static ServiceFabricHostBuilder <OmexStatelessService, StatelessServiceContext> AddRemotingListener <TListener>(
     this ServiceFabricHostBuilder <OmexStatelessService, StatelessServiceContext> builder)
     where TListener : RemotingListenerBuilder <OmexStatelessService> =>
 builder.AddServiceListener <TListener>();