本文整理汇总了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;
}
示例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));
}
示例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;
}
示例4: Modify
public IConfigureRoutingConventions Modify(Action<Route, RouteBuilderInfo> modifier)
#endif
{
modifier.MustNotBeNull();
_lambda.Modifier = modifier;
_parent.Add((IModifyRoute)_lambda);
return _parent;
}
示例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);
}
示例6: WithCommandOptions
public IConfigureCommand WithCommandOptions(Action<DbCommand> options)
{
options.MustNotBeNull();
ApplyOptions = options;
return this;
}