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


C# Action.MustNotBeNull方法代码示例

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


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

示例1: WithSqlStorages

 public static IConfigureHost WithSqlStorages(this IConfigureHost host,IDbFactory connection ,Action<StoragesConfiguration> cfgAction)
 {
     cfgAction.MustNotBeNull();
     var cfg=new StoragesConfiguration(host,connection);
     cfgAction(cfg);
     return host;
 }
开发者ID:DomainBus,项目名称:DomainBus.Sql,代码行数:7,代码来源:Extensions.cs

示例2: MapSite

        /// <summary>
        /// 
        /// </summary>
        /// <param name="builder"></param>
        /// <param name="hostname"></param>
        /// <param name="branch"></param>
        /// <returns></returns>
        /// <exception cref="System.ArgumentNullException">builder</exception>
        /// <exception cref="System.ArgumentException">hostname</exception>
        /// <exception cref="System.ArgumentNullException">branch</exception>
        public static IAppBuilder MapSite(this IAppBuilder builder, string hostname, Action<IAppBuilder> branch)
        {
            builder.MustNotBeNull("builder");
            hostname.MustNotBeNullOrWhitespace("hostname");
            branch.MustNotBeNull("branch");

            return MapSite(builder, new[] { new MapSiteConfig(hostname) }, builder.BranchConfig(branch));
        }
开发者ID:modulexcite,项目名称:SiteMappingMiddleware,代码行数:18,代码来源:AppBuilderExtensions.cs

示例3: Add

 /// <summary>
 /// Adds a processor which must be configured with the handlers the processor should execute
 /// </summary>
 /// <param name="procs"></param>
 /// <param name="name">Processor name</param>
 /// <param name="cfg">Handlers discovery</param>
 /// <param name="svcCfg"></param>
 /// <returns></returns>
 public static IConfigureProcessors Add(this IConfigureProcessors procs,string name,Action<IConfigureLambdaEndpoint> cfg,Action<IConfigureProcessingService> svcCfg=null)
 {
     cfg.MustNotBeNull();
     var proc=new HostedEndpointConfiguration(name);
     cfg(proc);
     procs.ForEndpoint(proc, svcCfg);
     return procs;
 }
开发者ID:DomainBus,项目名称:DomainBus,代码行数:16,代码来源:BusBuilderExtensions.cs

示例4: Modify

		public IConfigureRoutingConventions Modify(Action<Route, RouteBuilderInfo> modifier)
#endif
        {
            modifier.MustNotBeNull();
            _lambda.Modifier = modifier;
            _parent.Add((IModifyRoute)_lambda);
            return _parent;
        }
开发者ID:Deson621,项目名称:MvcPowerTools,代码行数:8,代码来源:LambdaConventionConfigurator.cs

示例5: RegisterInContainer

 /// <summary>
 /// Registers types with a DI Container using the provided action
 /// </summary>
 /// <param name="typeRegistration">Action which will register a type with the DI Container</param>
 /// <param name="genericTypeRegistration">Action which will register a generic open type with the DI Container</param>
 public static void RegisterInContainer(Action<Type> typeRegistration,Action<Type> genericTypeRegistration)
 {
     typeRegistration.MustNotBeNull();
     genericTypeRegistration.MustNotBeNull();
     typeRegistration(typeof (ValidModelOnlyAttribute));
     Array.ForEach(TypesForDIContainer, genericTypeRegistration);
 }
开发者ID:Deson621,项目名称:MvcPowerTools,代码行数:12,代码来源:ValidModelOnlyAttribute.cs

示例6: WithCommandOptions

 public IConfigureCommand WithCommandOptions(Action<DbCommand> options)
 {
     options.MustNotBeNull();
     ApplyOptions = options;
     return this;
 }
开发者ID:sapiens,项目名称:SqlFu,代码行数:6,代码来源:CommandConfiguration.cs


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