private T CreateServantAndProxy <T>(T subject) { var objectId = (ulong)_random.Next(); _servant = _servantCreator.CreateServant(_endPoint, _channel, objectId, subject); return(_proxyCreator.CreateProxy <T>(_endPoint, _channel, objectId)); }
private T TestGenerate <T>() { Type type = null; new Action(() => type = _creator.GenerateProxy <T>()) .ShouldNotThrow(); type.Should().NotBeNull(); _objectId = (ulong)_random.Next(); var obj = _creator.CreateProxy <T>(_endPoint.Object, _channel.Object, _objectId); var proxy = obj as IProxy; proxy.Should().NotBeNull(); proxy.ObjectId.Should().Be(_objectId); return(obj); }
/// <inheritdoc /> public T CreateProxy <T>(IRemotingEndPoint endPoint, IEndPointChannel channel, ulong objectId) { return(_proxyCreator.CreateProxy <T>(endPoint, channel, objectId)); }