Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
        private IServant TestGenerate <T>(T subject)
        {
            Type type = null;

            new Action(() => type = _creator.GenerateServant <T>())
            .Should().NotThrow();

            type.Should().NotBeNull();

            _objectId = (ulong)_random.Next();
            IServant servant = _creator.CreateServant(_endPoint.Object, _channel.Object, _objectId, subject);

            servant.Should().NotBeNull();
            servant.ObjectId.Should().Be(_objectId);
            servant.Subject.Should().BeSameAs(subject);

            return(servant);
        }
Ejemplo n.º 3
0
 /// <inheritdoc />
 public IServant CreateServant <T>(IRemotingEndPoint endPoint, IEndPointChannel channel, ulong objectId, T subject)
 {
     return(_servantCreator.CreateServant(endPoint, channel, objectId, subject));
 }