protected void Register <TIn, TOut>(string path, DataDelegate <TIn, TOut> callback) where TIn : new() { if (!path.StartsWith(_name, StringComparison.InvariantCultureIgnoreCase)) { var absolutePath = PayloadHelper.PathJoin(_name, path); _server.Register(absolutePath, callback); } }
protected Task <TOut> Send <TIn, TOut>(string path, TIn data, TimeSpan attemptTimeout, int attemptsCount, CancellationToken cancel, Action <int> progressCallback) where TOut : new() { return(_client.Send <TIn, TOut>(PayloadHelper.PathJoin(_name, path), data, attemptTimeout, attemptsCount, cancel, progressCallback)); }
protected IObservable <Result <TOut> > Register <TOut>(string path) where TOut : new() { var absolutePath = PayloadHelper.PathJoin(_name, path); return(_client.Register <TOut>(absolutePath)); }
protected Task SendError(DeviceIdentity devId, string path, ErrorType errorCode, string message, CancellationToken cancel) { return(_server.SendError(devId, PayloadHelper.PathJoin(_name, path), errorCode, message, cancel)); }
protected Task Send <T>(DeviceIdentity devId, string path, T data, CancellationToken cancel) { return(_server.SendResult(devId, PayloadHelper.PathJoin(_name, path), data, cancel)); }