public UseAspNetCoreListenerCommunicationListenerTheoryExtension Setup(
            ServiceHostAspNetCoreCommunicationListenerFactory factory)
        {
            this.Factory = factory;

            return(this);
        }
 public UseAspNetCoreListenerCommunicationListenerTheoryExtension()
 {
     this.Factory = (
         context,
         name,
         factory) => new MockAspNetCoreCommunicationListener(context, factory);
 }
Beispiel #3
0
            public void UseCommunicationListener(
                ServiceHostAspNetCoreCommunicationListenerFactory factoryFunc,
                Action <IWebHostBuilder> configAction)
            {
                this.AspNetCoreCommunicationListenerFunc = factoryFunc
                                                           ?? throw new ArgumentNullException(nameof(factoryFunc));

                this.WebHostCommunicationListenerConfigAction = configAction
                                                                ?? throw new ArgumentNullException(nameof(configAction));
            }
        public static TCaller UseCommunicationListener <TCaller>(
            this TCaller @this,
            ServiceHostAspNetCoreCommunicationListenerFactory factoryFunc,
            Action <IWebHostBuilder> configAction)
            where TCaller : IConfigurableObject <IServiceHostAspNetCoreListenerReplicaTemplateConfigurator>
        {
            @this.ConfigureObject(
                configurator => configurator.UseCommunicationListener(factoryFunc, configAction));

            return(@this);
        }