示例#1
0
        Task <Message> IOperationExecutor.ExecuteOperation(OperationContext context)
        {
            NetContractDescription contract = Node.Dispatcher.GetContractForMessage(context.Message.Id);
            LockType lockType = _handlers[contract.TypeId].GetLockTypeForOperation(context.Message);

            return(Fiber.Call(() => DispatchAndReturnAsync(context), lockType));
        }
示例#2
0
        public ActorDescription(Type type, IEnumerable <NetContractDescription> contracts, ActorAttribute attribute)
        {
            Attribute            = attribute ?? new ActorAttribute();
            ImplementedContracts = contracts.ToList();
            Type = type;

            PrimaryContract = ImplementedContracts.Single(x => x.IsPrimary);
        }
 public void Init(uint serviceKey, NetContractDescription description, IMessageFactory messageFactory, INetPeer channel, ActorKey? actor = null)
 {
     Actor = actor;
     _description = description;
     _messageFactory = messageFactory;
     Channel = channel;
 }
示例#4
0
 public EntityDomainDescriptionTests()
 {
     _protocolDesc = new OperationDispatcher(Substitute.For <IMessageFactory>(),
                                             new NetProxy[] { new ISomeServiceProxy() });
     _contractDesc = _protocolDesc.GetContract(ServiceTypeId);
 }