public SearchController( IReactionService reactionService, ISearchService searchService) { _reactionService = reactionService; _searchService = searchService; }
public CommentController( ICommentService commentService, IReactionService reactionService ) { _commentService = commentService; _reactionService = reactionService; }
public PostsController(ILogger <PostsController> logger, IMapper mapper, IPostService postService, IReactionService reactionService) { _logger = logger; _mapper = mapper; _reactionService = reactionService; _postService = postService; }
private async Task Setup() { var redisSetup = new Setup(this.logger); this.logger.Information("Initializing the services setup..."); services = new ServiceCollection().AddStackExchangeRedisExtensions <NewtonsoftSerializer>(redisSetup.RedisConfiguration); serviceProvider = services.BuildServiceProvider(); redis = serviceProvider.GetService <IRedisDatabase>(); reactionService = new ReactionService(this.logger, redis); infractionService = new InfractionService(this.logger, redis); logService = new LogService(this.logger, redis); services.AddSingleton(this.logger) .AddSingleton(reactionService) .AddSingleton(infractionService) .AddSingleton(logService); serviceProvider = services.BuildServiceProvider(); this.logger.Information("Successfully setup the services."); config = await redis.GetAsync <Config>(RedisKeyNaming.Config).ConfigureAwait(true); if (config == null || string.IsNullOrWhiteSpace(config.Token)) { this.logger.Information("Initializing the bot token setup..."); Console.Write("Your bot token: "); var token = Console.ReadLine(); if (config == null) { config = new Config() { Token = token }; await redis.AddAsync(RedisKeyNaming.Config, config).ConfigureAwait(true); } else if (string.IsNullOrWhiteSpace(config.Token)) { config.Token = token; await redis.ReplaceAsync(RedisKeyNaming.Config, config).ConfigureAwait(true); } this.logger.Information("Successfully set the bot token into the database."); } else { this.logger.Information("Discord token is already set and will be used from the database."); } OpenCL.IsEnabled = false; this.logger.Information("Disabled GPU acceleration."); await Task.CompletedTask.ConfigureAwait(true); }
public SuggestionService( IAccountService accountService, IPostService postService, IReactionService reactionService, DataContext context, IMapper mapper) { _accountService = accountService; _postService = postService; _reactionService = reactionService; _context = context; _mapper = mapper; }
public PostsService(IDeletableEntityRepository <Post> postRepository, IImagesService imagesService, ICameraService cameraService, ILocationsService locationsService, ICountriesService countriesService, ITagsService tagsService, IReactionService reactionService, IVideosService videosService, IDeletableEntityRepository <PostType> postTypeRepository, IDeletableEntityRepository <PostTag> postTagsRepository) { this.imagesService = imagesService; this.postRepository = postRepository; this.cameraService = cameraService; this.locationsService = locationsService; this.countriesService = countriesService; this.tagsService = tagsService; this.reactionService = reactionService; this.videosService = videosService; this.postTypeRepository = postTypeRepository; this.postTagsRepository = postTagsRepository; }
public ActivityStreamController( IWebHostEnvironment environment, SignInManager <UserProfileModel> signInManager, UserManager <UserProfileModel> userManager, IPostService posts, IUserProfileService localProfiles, IPublicProfileService publicProfiles, IReactionService reactions, ITagService tags, INotificationService notifications, IPeerService peers, IAuthService auth, ISettingsService settings, IActivityStreamRepository activityStreams ) : base(signInManager, userManager, localProfiles, publicProfiles, auth, settings) { _environment = environment; _posts = posts; _reactions = reactions; _tags = tags; _notifications = notifications; _peers = peers; _activityStreams = activityStreams; }
public Role(ILogger logger, IReactionService reactionService) { this.logger = logger; this.reactionService = reactionService; }
public ReactionController(IUserService userService, IReactionService reactionService) : base(userService) { _reactionService = reactionService; }