当前位置: 首页>>代码示例>>C#>>正文


C# ActionCall.Trace方法代码示例

本文整理汇总了C#中ActionCall.Trace方法的典型用法代码示例。如果您正苦于以下问题:C# ActionCall.Trace方法的具体用法?C# ActionCall.Trace怎么用?C# ActionCall.Trace使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ActionCall的用法示例。


在下文中一共展示了ActionCall.Trace方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Attach

        public virtual void Attach(IViewProfile viewProfile, ViewBag bag, ActionCall action)
        {
            // No duplicate views!
            var outputNode = action.ParentChain().Output;
            if (outputNode.HasView(viewProfile.ConditionType)) return;

            var log = new ViewAttachmentLog(viewProfile);
            action.Trace(log);

            foreach (var filter in _filters)
            {
                var viewTokens = filter.Apply(action, bag);
                var count = viewTokens.Count();

                if (count > 0)
                {
                    log.FoundViews(filter, viewTokens.Select(x => x.Resolve()));
                }

                if (count != 1) continue;

                var token = viewTokens.Single().Resolve();
                outputNode.AddView(token, viewProfile.ConditionType);

                break;
            }
        }
开发者ID:jorferreira,项目名称:fubumvc,代码行数:27,代码来源:ViewAttacher.cs

示例2: Matches

        public virtual bool Matches(ActionCall call)
        {
            if (!IsHandlerCall(call))
            {
                return false;
            }

            call.Trace("Matched on {0}", GetType().Name);

            return true;
        }
开发者ID:RobertTheGrey,项目名称:FubuMVC.HandlerConventions,代码行数:11,代码来源:HandlersUrlPolicy.cs

示例3: Alter

        public static void Alter(IRouteDefinition route, ActionCall call)
        {
            var properties = call.HasInput
                                 ? new TypeDescriptorCache().GetPropertiesFor(call.InputType()).Keys
                                 : new string[0];

            Alter(route, call.Method.Name, properties, text => call.Trace(text));

            if (call.HasInput)
            {
                route.ApplyInputType(call.InputType());
            }
        }
开发者ID:aluetjen,项目名称:fubumvc,代码行数:13,代码来源:MethodToUrlBuilder.cs

示例4: Matches

        public bool Matches(ActionCall call)
        {
            var result = call.InputType() == _inputType;

            if (result && _foundCallAlready)
            {
                throw new FubuException(1003,
                                        "Cannot make input type '{0}' the default route as there is more than one action that uses that input type. Either choose a input type that is used by only one action, or use the other overload of '{1}' to specify the actual action method that will be called by the default route.",
                                        _inputType.Name,
                                        ReflectionHelper.GetMethod<RouteConventionExpression>(r => r.HomeIs<object>()).
                                            Name
                    );
            }

            if (result) _foundCallAlready = true;

            if (result)
            {
                call.Trace("Action '{0}' is the default route since its input type is {1} which was specified in the configuration as the input model for the default route", call.Method.Name, _inputType.Name);
            }

            return result;
        }
开发者ID:mtscout6,项目名称:fubumvc,代码行数:23,代码来源:DefaultRouteInputTypeBasedUrlPolicy.cs


注:本文中的ActionCall.Trace方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。