/// <summary> /// Used in <see cref="BotManager"/>. /// Override default singleton. /// </summary> public static void AddExecutionManager <TExecutionManager>(this ServiceCollectionWrapper @this) where TExecutionManager : class, IExecutionManager { @this.Services.AddSingleton <IExecutionManager, TExecutionManager>(); }
/// <summary> /// Used in <see cref="BotManager"/>. /// Override default singleton. /// </summary> public static void AddPendingExceededChecker(this ServiceCollectionWrapper @this, Func <IServiceProvider, IExecutionManager> func) { @this.Services.AddSingleton <IExecutionManager>(func); }
/// <summary> /// Used in <see cref="BotManager"/>. /// Override default singleton. /// </summary> public static void AddPendingExceededChecker <TPendingExceededChecker>(this ServiceCollectionWrapper @this) where TPendingExceededChecker : class, IPendingExceededChecker { @this.Services.AddSingleton <IPendingExceededChecker, TPendingExceededChecker>(); }