public UseGenericListenerCommunicationListenerTheoryExtension Setup(
            ServiceHostGenericCommunicationListenerFactory factory)
        {
            this.Factory = factory;

            return(this);
        }
        public static TCaller UseCommunicationListener <TCaller>(
            this TCaller @this,
            ServiceHostGenericCommunicationListenerFactory factoryFunc)
            where TCaller : IConfigurableObject <IServiceHostGenericListenerReplicaTemplateConfigurator>
        {
            @this.ConfigureObject(
                configurator => configurator.UseCommunicationListener(factoryFunc));

            return(@this);
        }
 public UseGenericListenerCommunicationListenerTheoryExtension()
 {
     this.Factory = (
         context,
         endpointName,
         provider) =>
     {
         return(new MockGenericCommunicationListener());
     };
 }
 public void UseCommunicationListener(
     ServiceHostGenericCommunicationListenerFactory factoryFunc)
 {
     this.GenericCommunicationListenerFunc = factoryFunc
                                             ?? throw new ArgumentNullException(nameof(factoryFunc));
 }