"景先生毕设|www.jxszl.com

C# ActionCall类代码示例

2023-12-29 16:58编辑: www.jxszl.com景先生毕设
本文整理汇总了C#中ActionCall类的典型用法代码示例。如果您正苦于以下问题:C# ActionCall类的具体用法?C# ActionCall怎么用?C# ActionCall使用的例子? 这里精选的类代码示例或许可以为您提供帮助。 示例1: Apply public IEnumerable Apply(ActionCall call, ViewBag views) { if(call.OutputType() == typeof(FubuContinuation) || !_policyResolver.HasMatchFor(call)) { return new IViewToken[0]; } string viewName = _policyResolver.ResolveViewName(call); string viewLocatorName = _policyResolver.ResolveViewLocator(call); IEnumerable allViewTokens = views.Views.Where(view => view.GetType().CanBeCastTo()).Cast(); SparkViewDescriptor matchedDescriptor = null; allViewTokens.FirstOrDefault( token => { matchedDescriptor = token.Descriptors .Where(e => e.Templates .Any(template => template.Contains(viewLocatorName) && template.Contains(viewName))) .SingleOrDefault(); return matchedDescriptor != null; }); IEnumerable viewsBoundToActions = matchedDescriptor != null ? new IViewToken[] { new SparkViewToken(call, matchedDescriptor, viewLocatorName, viewName) } : new IViewToken[0]; return viewsBoundToActions; }
原文链接:http://www.jxszl.com/biancheng/C/556454.html