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


C# Func.MustNotBeNull方法代码示例

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


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

示例1: DefaultBuilder

 public IConfigureConventions DefaultBuilder(Func<ModelInfo, HtmlTag> action)
 {
     action.MustNotBeNull();
     var lambda = new LambdaConventions(LambdaConventions.AppliesAlways);
     lambda.Builder = action;
     _defaultBuilder = lambda;
     return this;
 }
开发者ID:Deson621,项目名称:MvcPowerTools,代码行数:8,代码来源:ConventionsRegistry.cs

示例2: Build

		public IConfigureRoutingConventions Build(Func<RouteBuilderInfo, IEnumerable<Route>> builder)
#endif
        {
            builder.MustNotBeNull();
            _lambda.Builder = builder;
            _parent.Add((IBuildRoutes)_lambda);
            return _parent;
        }
开发者ID:Deson621,项目名称:MvcPowerTools,代码行数:8,代码来源:LambdaConventionConfigurator.cs

示例3: WriteColumnsNames

 public static void WriteColumnsNames(ICollection<string> columns, StringBuilder builder, Func<string, string> formatter)
 {
     columns.MustNotBeNull();
     formatter.MustNotBeNull();
     foreach (var column in columns)
     {
         builder.Append(formatter(column.Trim())).Append(",");
     }
     builder.RemoveLast();
 }
开发者ID:venliong,项目名称:SqlFu,代码行数:10,代码来源:CommonDDLWriter.cs

示例4: SmartContextFacade

 public SmartContextFacade(Controller ctrl,Func<dynamic> modelIdentifier,Type validationFailedPolicy,IValidationFailedPolicyFactory factory)
 {
     ctrl.MustNotBeNull();
     modelIdentifier.MustNotBeNull();
     validationFailedPolicy.MustNotBeNull();
     factory.MustNotBeNull();
     _ctrl = ctrl;
     _modelIdentifier = modelIdentifier;
     _validationFailedPolicy = validationFailedPolicy;
     IsPost = ctrl.HttpContext.Request.IsPost();
     _factory = factory;
 }
开发者ID:Deson621,项目名称:MvcPowerTools,代码行数:12,代码来源:SmartContextFacade.cs

示例5: PublishAfterStoring

 /// <summary>
 /// Stores the events using the specified action then publish them.
 /// If persisting throws a <see cref="DuplicateOperationException"/> it will use those events for publishing
 /// </summary>
 /// <param name="bus"></param>
 /// <param name="persistAction">Should throw <see cref="DuplicateOperationException"/> if a commit is duplicate</param>
 public static void PublishAfterStoring(this IDispatchMessages bus,Func<IEvent[]> persistAction)
 {
     persistAction.MustNotBeNull();
     IEvent[] events = Array.Empty<IEvent>();
    try
    {
         events=persistAction();
    }
     catch (DuplicateOperationException ex)
     {
         events = ex.Events;
     }
    
     bus.Publish(events);            
 }
开发者ID:DomainBus,项目名称:DomainBus,代码行数:21,代码来源:Extensions.cs

示例6: MethodToExecute

 public IConfigureMakeSharp MethodToExecute(Func<MethodInfo, bool> matchMethod)
 {
     matchMethod.MustNotBeNull();
     _matchMethod = matchMethod;
     return this;
 }
开发者ID:RejectKid,项目名称:MakeSharp,代码行数:6,代码来源:MakeSharpConfiguration.cs

示例7: TasksAre

 public IConfigureMakeSharp TasksAre(Func<Type, bool> matchType)
 {
     matchType.MustNotBeNull();
     _matchType = matchType;
     return this;
 }
开发者ID:RejectKid,项目名称:MakeSharp,代码行数:6,代码来源:MakeSharpConfiguration.cs

示例8: WriteColumnsNames

 public static void WriteColumnsNames(string columns, StringBuilder builder, Func<string, string> formatter)
 {
     columns.MustNotBeEmpty();
     formatter.MustNotBeNull();
     WriteColumnsNames(columns.Split(','), builder, formatter);
 }
开发者ID:eugman,项目名称:SqlFu,代码行数:6,代码来源:CommonDDLWriter.cs


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