public AccountCreatedIntegrationEventHandler(IIpInformationService ipInformation, IGravatarService gravatar, IKafkaMessageBus bus) { _ipInformation = ipInformation; _gravatar = gravatar; _bus = bus; }
public TopicModelBuilder(AtlasDbContext dbContext, ICacheManager cacheManager, IGravatarService gravatarService) { _dbContext = dbContext; _cacheManager = cacheManager; _gravatarService = gravatarService; }
public GetAll() { _fakeRepository = new FakeRepository(); _fakeGravatarService = new FakeGravatarService(); SpeakerFactory.Create(_fakeRepository); _speakerService = new SpeakerService(_fakeRepository, _fakeGravatarService); }
public ChangeAvatarController(IAuthService authService, IProfileService profileService, IAvatarService avatarService, IAvatarFilesService avatarFilesService, IGravatarService gravatarService) { _authService = authService; _profileService = profileService; _avatarService = avatarService; _avatarFilesService = avatarFilesService; _gravatarService = gravatarService; }
public UserModelBuilder(AtlasDbContext dbContext, ICacheManager cacheManager, IGravatarService gravatarService, ISearchModelBuilder searchModelBuilder) { _dbContext = dbContext; _cacheManager = cacheManager; _gravatarService = gravatarService; _searchModelBuilder = searchModelBuilder; }
public ContextService(IHttpContextAccessor httpContextAccessor, ICacheManager cacheManager, AtlesDbContext dbContext, IGravatarService gravatarService) { _httpContextAccessor = httpContextAccessor; _cacheManager = cacheManager; _dbContext = dbContext; _gravatarService = gravatarService; }
public MenuControlViewModel(INavigationService navigationService, IAccountService accountService, IRestService restservice, IInternetConnectionService internetConnectionService, IGravatarService gravatarService) : base(navigationService) { Messenger.Default.Register <MessageToMenuControl>(this, x => HandleMenuControlMessage(x.SearchButton, x.SaveButton, x.TitleString)); _accountService = accountService; _internetConnectionService = internetConnectionService; _restservice = restservice; _gravatarService = gravatarService; LogoutButtonVisibility = _accountService.IsUserLoggedIn(); SearchVisibility = false; GetGravatar(); }
public BlogService(IPandaDataProvider dataProvider, IMapper mapper, IMediaStorageService mediaStorageService, ISlugService slugService, IEmailService emailService, IDataProtectionProvider dataProtectionProvider, IGravatarService gravatarService, IReCaptchaValidator reCaptchaValidator) { _dataProvider = dataProvider; _mapper = mapper; _mediaStorageService = mediaStorageService; _slugService = slugService; _emailService = emailService; _protector = dataProtectionProvider.CreateProtector("Panda.BlogService"); _gravatarService = gravatarService; _reCaptchaValidator = reCaptchaValidator; }
public CommentsModule(IBarCodes barCodes, IComments comments, IUsers users, IEventLog eventLog, IGravatarService gravatarService) : base("/Comment") { this.RequiresAuthentication(); this.barCodes = barCodes; this.comments = comments; this.users = users; this.eventLog = eventLog; this.gravatarService = gravatarService; Get["/{id}"] = x => { if (!this.barCodes.Exists(x.id)) { return(Response.AsJson(Enumerable.Empty <Comment>())); } IEnumerable <Comment> commentsForBarCode = this.comments.GetCommentsForBarCode(x.id); Comment[] ret = this.gravatarService.AddAvatarToComments(commentsForBarCode).ToArray(); return(Response.AsJson(ret)); }; Post["/{id}"] = x => { if (!this.barCodes.Exists(x.id)) { return(Response.AsJson(Enumerable.Empty <Comment>())); } Comment comment = this.Bind <Comment>(); comment.Author = this.users.GetIdByUsername(this.Context.CurrentUser.UserName); this.comments.Add(comment); Comment[] commentsForBarCode = this.comments.GetCommentsForBarCode(x.id).ToArray(); this.Log(x.id, comment.Author, "COMMENT", comment.Text); return(Response.AsJson(commentsForBarCode)); }; }
public CommentsModule(IBarCodes barCodes, IComments comments, IUsers users, IEventLog eventLog, IGravatarService gravatarService) : base("/Comment") { this.RequiresAuthentication(); this.barCodes = barCodes; this.comments = comments; this.users = users; this.eventLog = eventLog; this.gravatarService = gravatarService; Get["/{id}"] = x => { if (!this.barCodes.Exists(x.id)) return Response.AsJson(Enumerable.Empty<Comment>()); IEnumerable<Comment> commentsForBarCode = this.comments.GetCommentsForBarCode(x.id); Comment[] ret = this.gravatarService.AddAvatarToComments(commentsForBarCode).ToArray(); return Response.AsJson(ret); }; Post["/{id}"] = x => { if (!this.barCodes.Exists(x.id)) return Response.AsJson(Enumerable.Empty<Comment>()); Comment comment = this.Bind<Comment>(); comment.Author = this.users.GetIdByUsername(this.Context.CurrentUser.UserName); this.comments.Add(comment); Comment[] commentsForBarCode = this.comments.GetCommentsForBarCode(x.id).ToArray(); this.Log(x.id, comment.Author, "COMMENT", comment.Text); return Response.AsJson(commentsForBarCode); }; }
public GetAll(ContextFixture fixture) { _repository = new Repository <Speaker>(fixture.Context); _gravatarService = new GravatarService(); }
/// <summary> /// Initializes a new instance of the <see cref="GravatarsViewModel"/> class. /// </summary> /// <param name="gravatarService">The gravatar service.</param> /// <remarks></remarks> public GravatarsViewModel(IGravatarService gravatarService) { Persons = new CollectionView(gravatarService.Persons); }
public void SetUp() { _profileProvider = Substitute.For <IProfileProvider>(); _gravatarService = new GravatarService(_profileProvider); }
public EmailToGravatarConverter(IGravatarService gravatarService) { _gravatarService = gravatarService; }
public SpeakerService(object fakeRepository, IGravatarService fakeGravatarService) { _fakeRepository = fakeRepository; this.fakeGravatarService = fakeGravatarService; }
public SpeakerService(IRepository <Models.Speaker> repository, IGravatarService gravatarService) { _repository = repository; _gravatarService = gravatarService; }
public CachedGravatarService(IGravatarService decoratedGravatarService) { _decoratedGravatarService = decoratedGravatarService; _cache = new ConcurrentDictionary <string, ProfileInfo>(); }