public AuthorizationService(IServiceProvider serviceProvider, IClaimMappingRepository claimMappingRepository, ISelfUserProvider selfUserProvider) { // Workaround for circular dependency. _lazyUserService = new Lazy <IUserService>(() => serviceProvider.GetRequiredService <IUserService>()); ClaimMappingRepository = claimMappingRepository; SelfUserProvider = selfUserProvider; }
/// <summary> /// Constructs a new <see cref="MutePersistingHandler"/> object with the given injected dependencies. /// </summary> /// <param name="moderationService">A moderation service to interact with the infractions system.</param> /// <param name="selfUserProvider">The Discord user that the bot is running as.</param> public MutePersistingHandler( IModerationService moderationService, ISelfUserProvider selfUserProvider) { _moderationService = moderationService; _selfUserProvider = selfUserProvider; }
public MessageService( IDiscordSocketClient discordSocketClient, ISelfUserProvider selfUserProvider, IMessageRepository messageRepository) { _discordSocketClient = discordSocketClient; _selfUserProvider = selfUserProvider; _messageRepository = messageRepository; }
/// <summary> /// Constructs a new <see cref="InvitePurgingBehavior"/> object, with the given injected dependencies. /// </summary> public InvitePurgingBehavior( IDesignatedChannelService designatedChannelService, IAuthorizationService authorizationService, IModerationService moderationService, ISelfUserProvider selfUserProvider) { DesignatedChannelService = designatedChannelService; AuthorizationService = authorizationService; ModerationService = moderationService; SelfUserProvider = selfUserProvider; }
/// <summary> /// Constructs a new <see cref="PromotionLoggingHandler"/> object, with injected dependencies. /// </summary> public PromotionLoggingHandler( IAuthorizationService authorizationService, IDiscordClient discordClient, IDesignatedChannelService designatedChannelService, IUserService userService, IPromotionsService promotionsService, ISelfUserProvider selfUserProvider) { AuthorizationService = authorizationService; DiscordClient = discordClient; DesignatedChannelService = designatedChannelService; UserService = userService; PromotionsService = promotionsService; SelfUserProvider = selfUserProvider; }
/// <summary> /// Constructs a new <see cref="PromotionLoggingHandler"/> object, with injected dependencies. /// </summary> public PromotionLoggingHandler( IAuthorizationService authorizationService, IDiscordClient discordClient, IDesignatedChannelService designatedChannelService, IUserService userService, IPromotionsService promotionsService, ISelfUserProvider selfUserProvider, IOptions <ModixConfig> modixConfig) { AuthorizationService = authorizationService; DiscordClient = discordClient; DesignatedChannelService = designatedChannelService; UserService = userService; PromotionsService = promotionsService; SelfUserProvider = selfUserProvider; ModixConfig = modixConfig.Value; }
public CommandErrorHandler(ISelfUserProvider selfUserProvider, IMemoryCache memoryCache) { _selfUserProvider = selfUserProvider; _memoryCache = memoryCache; }