本文整理汇总了C#中IConsole.IsNull方法的典型用法代码示例。如果您正苦于以下问题:C# IConsole.IsNull方法的具体用法?C# IConsole.IsNull怎么用?C# IConsole.IsNull使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IConsole
的用法示例。
在下文中一共展示了IConsole.IsNull方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Bot
private int runCount = 0; // number of times run has been called
#endregion Fields
#region Constructors
/// <summary>
/// Initializes a new instance of the <see cref="Bot"/> class.
/// </summary>
/// <param name="client">The client.</param>
/// <param name="userInteraction">The user interaction manager..</param>
/// <param name="console">The console.</param>
/// <param name="settings">The settings.</param>
/// <param name="listener">The listener.</param>
/// <param name="pluginHandler">The plugin handler.</param>
/// <param name="moduleLoader">The module loader.</param>
/// <param name="authorization">The authorization manager.</param>
public Bot(
Client client,
IUserInteraction userInteraction,
IConsole console,
IBotSettings settings,
IListener listener,
IPluginHandler pluginHandler,
IModuleLoader moduleLoader,
IAuthorization authorization)
{
Guard.Against(client.IsNull(), "client");
Guard.Against(userInteraction.IsNull(), "userInteraction");
Guard.Against(console.IsNull(), "console");
Guard.Against(settings.IsNull(), "settings");
Guard.Against(listener.IsNull(), "listener");
Guard.Against(pluginHandler.IsNull(), "pluginHandler");
Guard.Against(moduleLoader.IsNull(), "moduleLoader");
Guard.Against(authorization.IsNull(), "authorization");
this.client = client;
this.userInteraction = userInteraction;
this.console = console;
this.settings = settings;
this.listener = listener;
this.pluginHandler = pluginHandler;
this.moduleLoader = moduleLoader;
this.authorization = authorization;
this.SessionStart = DateTime.Now;
}