Пример #1
0
        public Client(IClientConnection connection, string serviceName, Action <string> log = null)
        {
            _connection = connection;

            _prefix     = serviceName + ".";
            _serializer = JsonSerializer.Create(new JsonSerializerSettings
            {
                CheckAdditionalContent = false,
            });

            _log = HostUtils.DefaultLog("Client: ", log);
        }
Пример #2
0
 public Host(string address, Action <string> log = null)
 {
     _address = address;
     _log     = HostUtils.DefaultLog("Host: ", log);
 }
Пример #3
0
 public Registry(Action <string> log)
 {
     _log = HostUtils.DefaultLog("Registry:", log);
 }
Пример #4
0
 public RequestHandler(Registry registry, Action <string> log = null)
 {
     _registry = registry;
     _log      = HostUtils.DefaultLog("Handler: ", log);
 }
Пример #5
0
 protected Server(string address, RequestHandler requestHandler, Action <string> log = null)
 {
     Log            = HostUtils.DefaultLog("Server: ", log);
     RequestHandler = requestHandler;
     Address        = address;
 }