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)); }
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; }
public EntityDomainDescriptionTests() { _protocolDesc = new OperationDispatcher(Substitute.For <IMessageFactory>(), new NetProxy[] { new ISomeServiceProxy() }); _contractDesc = _protocolDesc.GetContract(ServiceTypeId); }