Exemplo n.º 1
0
        public object BeforeCall(string operationName, object[] inputs)
        {
            if (!OperationByName.TryGetValue(operationName, out var description))
            {
                return(null);
            }

            var token     = description.GetToken(inputs);
            var operation = OperationManager.BeforeCall(description.FullName, token);

            // fix expected type
            description.PassTokenIntoService(inputs, operation?.Token ?? token);

            return(operation);
        }
Exemplo n.º 2
0
        public object BeforeCall(string operationName, object[] inputs)
        {
            if (!OperationByName.TryGetValue(operationName, out var description))
            {
                // method does not contain token
                return(null);
            }

            var token     = description.GetToken(inputs);
            var operation = OperationManager.BeforeCall(description.FullName, token);

            if (operation != null)
            {
                description.PassTokenIntoChannel(inputs, operation.Token);
            }

            return(operation);
        }