public MyHost(IClientProxyFactory factory, ILoggerFactory factory2) { var l = factory2.CreateLogger("sdfsdf"); l.LogInformation("test"); _factory = factory; }
public static IClientProxyFactory UseConsulDnsServiceDiscovery(this IClientProxyFactory @this, IConfiguration configuration) { return(@this .AddDependencyServices(services => { services.AddConsulOptions(configuration); services.AddConsulDnsServiceDiscovery(); })); }
public static IClientProxyFactory UseConsulDnsServiceDiscovery(this IClientProxyFactory @this, Action <ConsulOptions> configAction = null) { return(@this .AddDependencyServices(services => { services.AddDiscoveryServiceRouter(); services.AddConsulOptions(configAction); services.AddConsulDnsServiceDiscovery(); })); }
public static IClientProxyFactory UseChannel(this IClientProxyFactory @this, string groupName, string remoteAddress) { return(@this.Configure <RouterPointOptions>(o => { if (o.Categories == null) { o.Categories = new List <GroupIdentifierOption>(); } var channel = o.Categories.Find(x => x.GroupName == groupName); if (channel == null) { channel = new GroupIdentifierOption { GroupName = groupName }; o.Categories.Add(channel); } channel.RemoteAddress = remoteAddress; })); }
private static QAcidRunner <Unit> RegisterClient(IClientProxyFactory clientFactory, Broadcaster broadcaster) { return (from sleepTime in "sleeptime".Input(MGen.Int(0, 10)) from client in "new client".Input(() => MockRepository.GenerateMock <IClientProxy>()) from register in "Broadcaster.Register".Act( () => { clientFactory .Stub(f => f.CreateClientProxyForCurrentContext(null)) .IgnoreArguments() .Return(client) .Repeat.Once(); client .Stub(c => c.SendNotificationAsynchronously(null)) .IgnoreArguments() .WhenCalled(obj => Thread.Sleep(sleepTime)); broadcaster.Register(); }) from spec in "client is added to broadcaster".Spec(() => GetBroadcastersClients(broadcaster).Contains(client)) select Unit.Instance); }
public AppLoginHandler(ILogger logger, IClientProxyFactory clientFactory, IContainer container) : base(logger, clientFactory, container) { }
public BaseHandler(ILogger logger, IClientProxyFactory clientFactory, IContainer container) { Logger = logger; ClientFactory = clientFactory; Container = container; }
public static IClientProxyFactory UseMessagePackSerializer(this IClientProxyFactory @this) { return(@this.AddDependencyServices(services => { services.AddMessagePackSerializer(); })); }
public Broadcaster(IClientProxyFactory clientProxyFactory) { this.clientProxyFactory = clientProxyFactory; clients = new List <IClientProxy>(); }
public SchemaTagHandler(ILogger logger, IClientProxyFactory clientFactory, IContainer container) : base(logger, clientFactory, container) { }
public Broadcaster(IClientProxyFactory clientProxyFactory) { this.clientProxyFactory = clientProxyFactory; clients = new List<IClientProxy>(); }
public SchemaDeleteHandler(ILogger logger, IClientProxyFactory clientFactory, IConsoleWriter consoleWriter, IContainer container) : base(logger, clientFactory, container) { _consoleWriter = consoleWriter; }
public ContentImportHandler(ILogger logger, IClientProxyFactory clientFactory, IConsoleWriter consoleWriter, IContainer container) : base(logger, clientFactory, container) { this._consoleWriter = consoleWriter; }
private static QAcidRunner<Unit> RegisterClient(IClientProxyFactory clientFactory, Broadcaster broadcaster) { return from sleepTime in "sleeptime".Input(MGen.Int(0, 10)) from client in "new client".Input(() => MockRepository.GenerateMock<IClientProxy>()) from register in "Broadcaster.Register".Act( () => { clientFactory .Stub(f => f.CreateClientProxyForCurrentContext(null)) .IgnoreArguments() .Return(client) .Repeat.Once(); client .Stub(c => c.SendNotificationAsynchronously(null)) .IgnoreArguments() .WhenCalled(obj => Thread.Sleep(sleepTime)); broadcaster.Register(); }) from spec in "client is added to broadcaster".Spec(() => GetBroadcastersClients(broadcaster).Contains(client)) select Unit.Instance; }
public Service(IClientProxyFactory factory, IOrphanClientProxyFactory factory2, ILogger <Service> logger) { _factory = factory; _factory2 = factory2; _logger = logger; }
public static IClientProxyFactory UseDefaultChannel(this IClientProxyFactory @this, string remoteAddress) { return(@this.UseChannel("default", remoteAddress)); }
public AssetExportHandler(ILogger logger, IClientProxyFactory clientFactory, IConsoleWriter consoleWriter, IContainer container) : base(logger, clientFactory, container) { _consoleWriter = consoleWriter; }
public static IClientProxyFactory ConfigureLogging(this IClientProxyFactory @this, Action <ILoggingBuilder> configure) { return(@this.AddDependencyServices(services => services.AddLogging(configure))); }
public MyHost(IClientProxyFactory factory, IService Iservice) { _factory = factory; }
public static IClientProxyFactory UseCastleDynamicClientProxy(this IClientProxyFactory @this) { return(@this.AddDependencyServices(services => { services.AddDynamicClientProxy(); })); }
public Service(IClientProxyFactory factory) { _proxy = factory.CreateProxy <IService_1_1>("grpc"); }
public static IClientProxyFactory UseProtobufSerializer(this IClientProxyFactory @this) { return(@this.AddDependencyServices(services => { services.AddProtobufSerializer(); })); }
public BroadcasterSuite() { ThreadSwitch = false; ClientFactory = MockRepository.GenerateMock <IClientProxyFactory>(); Broadcaster = new Broadcaster(ClientFactory); }