Example #1
0
        public IDependencyCollection Register(IDependencyCollection services)
        {
            services.AddScopedToCollection <IFeedItemService, NewsService>();
            services.AddScoped <INewsService <News>, NewsService>();
            services.AddScopedToCollection <INotifyableService, NewsService>();
            services.AddScoped <ICacheableIntranetActivityService <News>, NewsService>();
            services.AddScoped <IIntranetActivityService, NewsService>();

            return(services);
        }
Example #2
0
        public IDependencyCollection Register(IDependencyCollection services)
        {
            services.AddScoped <IEventsService <Event>, EventsService>();
            services.AddScopedToCollection <IFeedItemService, EventsService>();
            services.AddScopedToCollection <INotifyableService, EventsService>();
            services.AddScoped <ICacheableIntranetActivityService <Event>, EventsService>();
            services.AddScoped <IIntranetActivityService, EventsService>();
            services.AddScoped <ISubscribableService, EventsService>();

            return(services);
        }
Example #3
0
        public IDependencyCollection Register(IDependencyCollection services)
        {
            services.AddScopedToCollection <INotifierService, UiNotifierService>();
            services.AddScopedToCollection <INotifierService, PopupNotifierService>();
            services.AddScopedToCollection <INotifierService, MailNotifierService>();
            services.AddScoped <INotificationsService, NotificationsService>();
            services.AddScoped <IUiNotificationService, UiNotificationService>();
            services.AddScoped <IPopupNotificationService, PopupNotificationsService>();
            services.AddScoped <IMemberNotifiersSettingsService, MemberNotifiersSettingsService>();
            services.AddScoped <IMailService, MailService>();
            services.AddTransient <INotificationSettingsService, NotificationSettingsService>();
            services.AddScoped <INotificationModelMapper <UiNotifierTemplate, UiNotificationMessage>, UiNotificationModelMapper>();
            services.AddScoped <INotificationModelMapper <PopupNotifierTemplate, PopupNotificationMessage>, PopupNotificationModelMapper>();
            services.AddScoped <INotificationModelMapper <EmailNotifierTemplate, EmailNotificationMessage>, MailNotificationModelMapper>();
            services.AddScoped <INotificationModelMapper <DesktopNotifierTemplate, DesktopNotificationMessage>, DesktopNotificationModelMapper>();
            services.AddScoped <INotifierTypeProvider>(provider => new NotifierTypeProvider(typeof(NotifierTypeEnum)));
            services.AddTransient <IBackofficeNotificationSettingsProvider, BackofficeNotificationSettingsProvider>();
            services.AddTransient <IBackofficeSettingsReader, BackofficeSettingsReader>();
            services.AddScoped <INotifierDataHelper, NotifierDataHelper>();
            services.AddScoped <INotifierDataBuilder, NotifierDataBuilder>();
            services.AddConfiguration <NotificationSettings>();

            services.AddScoped <INotificationSettingCategoryProvider, NotificationSettingCategoryProvider>();
            services.AddScoped <INotificationSettingsTreeProvider, NotificationSettingsTreeProvider>();
            services.AddScoped <INotificationContentProvider, NotificationContentProvider>();
            services.AddScoped(x =>
            {
                var result = new NotificationTypeProvider(typeof(NotificationTypeEnum));
                return((INotificationTypeProvider)result);
            });

            services.AddScopedToCollection <UintraBaseIntranetJob, ReminderJob>();
            services.AddScopedToCollection <UintraBaseIntranetJob, MontlyMailJob>();
            services.AddScopedToCollection <UintraBaseIntranetJob, SendEmailJob>();
            services.AddScopedToCollection <UintraBaseIntranetJob, UpdateActivityCacheJob>();
            services.AddScopedToCollection <UintraBaseIntranetJob, GdprMailsJob>();
            services.AddScoped <IReminderRunner, ReminderRunner>();
            services.AddScoped <IReminderService, ReminderService>();
            services.AddScoped <IMonthlyEmailService, MonthlyEmailService>();
            services.AddTransient <IJobFactory, IntranetJobFactory>();

            services.AddSingleton <IConfigurationProvider <ReminderConfiguration> >(i =>
            {
                var provider = new ConfigurationProvider <ReminderConfiguration>("Uintra.Features.Reminder.Configuration.reminderConfiguration.json");
                provider.Initialize();
                return(provider);
            });
            services.AddSingleton <IJobSettingsConfiguration>(i => JobSettingsConfiguration.Configure);

            services.AddScoped <UintraHub>();

            services.AddScoped <IUserIdProvider, SignalRUserIdProvider>();
            services.AddScoped <IUserMentionNotificationService, UserMentionNotificationService>();

            return(services);
        }
Example #4
0
        public IDependencyCollection Register(IDependencyCollection services)
        {
            // member
            services.AddScoped <IUmbracoMemberCreatedEventService, MemberEventService>();
            services.AddScoped <IUmbracoMemberAssignedRolesEventService, MemberEventService>();
            services.AddScoped <IUmbracoMemberRemovedRolesEventService, MemberEventService>();
            services.AddScoped <IUmbracoMemberDeletingEventService, MemberEventService>();
            services.AddScoped <IUmbracoMemberGroupDeletingEventService, MemberGroupEventService>();
            services.AddScoped <IUmbracoMemberGroupSavedEventService, MemberGroupEventService>();

            // media
            services.AddScoped <IUmbracoMediaSavedEventService, VideoConvertEventService>();
            //services.AddScoped<IUmbracoMediaTrashedEventService, SearchMediaEventService>();
            //services.AddScoped<IUmbracoMediaSavedEventService, SearchMediaEventService>();
            //services.AddScoped<IUmbracoMediaSavingEventService, SearchMediaEventService>();

            //content
            services.AddScopedToCollection <IUmbracoContentTrashedEventService, ArticlePageEventService>();
            services.AddScopedToCollection <IUmbracoContentPublishedEventService, ArticlePageEventService>();
            services.AddScopedToCollection <IUmbracoContentUnPublishedEventService, ArticlePageEventService>();

            //user tags
            services.AddScopedToCollection <IUmbracoContentTrashedEventService, UserTagsEventService>();
            services.AddScopedToCollection <IUmbracoContentPublishedEventService, UserTagsEventService>();
            services.AddScopedToCollection <IUmbracoContentUnPublishedEventService, UserTagsEventService>();

            return(services);
        }
Example #5
0
        public IDependencyCollection Register(IDependencyCollection services)
        {
            var assembly = typeof(SearchInjectModule).Assembly;

            services.AddScopedToCollection <IIndexer, NewsService>();
            services.AddScopedToCollection <IIndexer, ContentIndexer>();
            services.AddScopedToCollection <IIndexer, EventsService>();
            services.AddScopedToCollection <IIndexer, SocialService <Features.Social.Entities.Social> >();
            services.AddScopedToCollection <IIndexer, DocumentIndexer>();
            services.AddScopedToCollection <IIndexer, MembersIndexer <SearchableMember> >();
            services.AddScopedToCollection <IIndexer, UserTagsSearchIndexer>();
            services.AddScopedToCollection <IDocumentIndexer, DocumentIndexer>();
            services.AddScoped <IContentIndexer, ContentIndexer>();


            services.AddScoped(typeof(ISearchableMemberMapper <SearchableMember>), typeof(SearchableMemberMapper <SearchableMember>));
            services.AddScoped <IElasticSearchRepository, ElasticSearchRepository>();
            services.AddScoped(typeof(IElasticSearchRepository <>), typeof(ElasticSearchRepository <>));

            services.AddSingleton <ISearchApplicationSettings, SearchApplicationSettings>();

            services.AddSingleton(typeof(PropertiesDescriptor <SearchableActivity>), typeof(SearchableActivityMap));
            services.AddSingleton(typeof(PropertiesDescriptor <SearchableUintraActivity>), typeof(SearchableUintraActivityMap));
            services.AddSingleton(typeof(PropertiesDescriptor <SearchableContent>), typeof(SearchableContentMap));
            services.AddSingleton(typeof(PropertiesDescriptor <SearchableDocument>), typeof(SearchableDocumentMap));
            services.AddSingleton(typeof(PropertiesDescriptor <SearchableTag>), typeof(SearchableTagMap));
            services.AddSingleton(typeof(PropertiesDescriptor <SearchableMember>), typeof(SearchableUserMap));

            services.AddScoped <IElasticActivityIndex, ElasticActivityIndex>();
            services.AddScoped <IElasticUintraActivityIndex, ElasticUintraActivityIndex>();
            services.AddScoped <IElasticContentIndex, ElasticContentIndex>();
            services.AddScoped <IElasticDocumentIndex, ElasticDocumentIndex>();
            services.AddScoped <IElasticTagIndex, ElasticTagIndex>();

            services.AddScoped <IActivityUserTagIndex, ActivityUserTagIndex>();
            services.AddScoped <IUserTagsSearchIndexer, UserTagsSearchIndexer>();

            services.AddScoped(typeof(IElasticMemberIndex <SearchableMember>), typeof(ElasticMemberIndex <SearchableMember>));

            services.AddScoped <IElasticEntityMapper, ElasticActivityIndex>();
            services.AddScoped <IElasticEntityMapper, ElasticContentIndex>();
            services.AddScoped <IElasticEntityMapper, ElasticDocumentIndex>();
            services.AddScoped <IElasticEntityMapper, ElasticTagIndex>();
            services.AddScoped <IElasticEntityMapper, ElasticMemberIndex <SearchableMember> >();

            services.AddScoped <IElasticIndex, UintraElasticIndex>();
            services.AddScoped <IMemberSearchDescriptorBuilder, MemberSearchDescriptorBuilder>();
            services.AddScoped(typeof(ISearchSortingHelper <>), typeof(BaseSearchSortingHelper <>));
            services.AddScoped(typeof(ISearchPagingHelper <>), typeof(BaseSearchPagingHelper <>));
            services.AddScoped <ISearchScoreProvider, SearchScoreProvider>();
            services.AddSingleton <ISearchableTypeProvider>(d => new SearchableTypeProvider(typeof(UintraSearchableTypeEnum)));
            services.AddScoped <ISearchUmbracoHelper, SearchUmbracoHelper>();
            services.AddScoped <IIndexerDiagnosticService, IndexerDiagnosticService>();

            services.AddScoped <ISearchContentPanelConverterProvider, SearchContentPanelConverterProvider>();
            services.AddScoped <SearchDocumentPanelConverter <ArticleStartPanelViewModel>, ArticleStartPanelSearchConverter>();
            services.AddScoped <SearchDocumentPanelConverter <ArticleContinuedPanelViewModel>, ArticleContinuedPanelSearchConverter>();
            services.AddScoped <SearchDocumentPanelConverter <UserTagsPanelViewModel>, UserTagsPanelSearchConverter>();
            RegisterHelper.ConnectImplementationsToTypesClosing(services, typeof(ISearchDocumentPanelConverter <>), assembly.ToEnumerable(), false);



            return(services);
        }
Example #6
0
        public IDependencyCollection Register(IDependencyCollection services)
        {
            services.AddScopedToCollection <INotifyableService, ContentPageNotificationService>();

            return(services);
        }