void IServiceDispatchListener.OnOperationDescriptorFound(IOperationDescriptorFoundContext ctx) { var handler = OperationDescriptorFound; if (handler != null) { handler(ctx); } }
public override void OnOperationDescriptorFound(IOperationDescriptorFoundContext ctx) { if (ctx.OperationDescriptor.Extensions.ContainsKey(ControllerListener.NavigationResult)) { //设置mvc 的ActionResult 类型 if (ctx.OperationDescriptor.Extensions.ContainsKey(ControllerListener.NavigationResult)) ctx.Request.Context[ControllerListener.NavigationResult] = ctx.OperationDescriptor.Extensions[ControllerListener.NavigationResult]; } }
public override void OnOperationDescriptorFound(IOperationDescriptorFoundContext ctx) { if (ctx.OperationDescriptor.Extensions.ContainsKey(ControllerListener.NavigationResult)) { //设置mvc 的ActionResult 类型 if (ctx.OperationDescriptor.Extensions.ContainsKey(ControllerListener.NavigationResult)) { ctx.Request.Context[ControllerListener.NavigationResult] = ctx.OperationDescriptor.Extensions[ControllerListener.NavigationResult]; } } }
/// <summary> /// 在操作元数据被发现时进行监听 /// </summary> /// <param name="ctx"></param> public virtual void OnOperationDescriptorFound(IOperationDescriptorFoundContext ctx) { }