Exemplo n.º 1
0
            public void Version_attribute()
            {
                var @interface = ActorInterface.Of <TestVersionActor>();
                var attribute  = AssertHasCustomAttribute <VersionAttribute>(@interface.Grain);

                Assert.That(attribute.Version, Is.EqualTo(22));
            }
Exemplo n.º 2
0
        public ActorRef(SerializationInfo info, StreamingContext context)
        {
            var value = (string)info.GetValue("path", typeof(string));

            Path       = ActorPath.Deserialize(value);
            endpoint   = ActorEndpoint.Proxy(Path);
            @interface = ActorInterface.Of(Path);
        }
Exemplo n.º 3
0
        /// <inheritdoc />
        public ActorRef ActorOf(ActorPath path)
        {
            if (path == ActorPath.Empty)
            {
                throw new ArgumentException("Actor path is empty", nameof(path));
            }

            var @interface = ActorInterface.Of(path.Type);
            var proxy      = @interface.Proxy(path.Id, GrainFactory);

            return(new ActorRef(path, proxy, invoker));
        }
Exemplo n.º 4
0
 ActorRef(ActorPath path, IActorEndpoint endpoint)
     : this(path)
 {
     this.endpoint = endpoint;
     @interface    = ActorInterface.Of(path);
 }