コード例 #1
0
        public object AfterReceiveRequest(ref Message request, IClientChannel channel, InstanceContext instanceContext)
        {
            OperationContext.Current.ReplacePrimaryIdentity(_handler.Authenticate(
                                                                WebOperationContext.Current.IncomingRequest,
                                                                WebOperationContext.Current.OutgoingResponse,
                                                                new object[] {},
                                                                _validatorType,
                                                                OperationContext.Current.HasTransportLayerSecurity(),
                                                                _requiresTransportLayerSecurity,
                                                                _source));

            return(null);
        }
コード例 #2
0
        public ValueTask <(object returnValue, object[] outputs)> InvokeAsync(object instance, object[] inputs)
        {
            OperationContext.Current.ThrowIfNull().ReplacePrimaryIdentity(
                _handler.Authenticate(
                    WebOperationContext.Current.ThrowIfNull().IncomingRequest,
                    WebOperationContext.Current.ThrowIfNull().OutgoingResponse,
                    inputs,
                    _validatorType,
                    OperationContext.Current.ThrowIfNull().HasTransportLayerSecurity(),
                    _requiresTransportLayerSecurity,
                    _source));

            return(_invoker.InvokeAsync(instance, inputs));
        }