示例#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;
 }