public IDependencyCollection Register(IDependencyCollection services)
        {
            services.AddScoped <ICommentsService, CommentsService>();
            services.AddScoped <ICommentLinkPreviewService, CommentLinkPreviewService>();
            services.AddScoped <ICommentLinkHelper, CommentLinkHelper>();
            services.AddScoped <ICommentsHelper, CommentsHelper>();

            return(services);
        }
Esempio n. 2
0
        public IDependencyCollection Register(IDependencyCollection services)
        {
            services.AddScopedToCollection <INotifyableService, SocialService <Social> >();
            services.AddScoped <ICacheableIntranetActivityService <Social>, SocialService <Social> >();
            services.AddScoped <IFeedItemService, SocialService <Social> >();
            services.AddScoped <ISocialService <Social>, SocialService <Social> >();
            services.AddScoped <IIntranetActivityService, SocialService <Social> >();

            return(services);
        }
Esempio n. 3
0
        public IDependencyCollection Register(IDependencyCollection services)
        {
            services.AddScoped <IInstanceFactory, ReflectionInstanceFactory>();
            services.AddScoped <IDependencyResolver, CommandBusDependencyResolver>();
            services.AddScoped <ICommandPublisher, CommandPublisher>();
            services.AddScoped <IBusResolver, BusResolver>();
            services.AddSingleton <CommandBindingProviderBase, CommandBusConfiguration>();

            return(services);
        }
Esempio n. 4
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);
        }
        public IDependencyCollection Register(IDependencyCollection services)
        {
            services.AddScoped <INavigationModelsBuilder, NavigationModelsBuilder>();
            services.AddScoped <IUintraInformationService, UintraInformationService>();
            services.AddScoped <IMyLinksHelper, MyLinksHelper>();
            services.AddScoped <ISubNavigationModelBuilder, SubNavigationModelBuilder>();

            services.AddSingleton <INavigationApplicationSettings, NavigationApplicationSettings>();

            return(services);
        }
Esempio n. 6
0
        public IDependencyCollection Register(IDependencyCollection services)
        {
            services.AddTransient <ICentralFeedLinkProvider, CentralFeedLinkProvider>();
            services.AddTransient <IGroupFeedLinkProvider, GroupFeedLinkProvider>();
            services.AddTransient <IActivityLinkService, ActivityLinkService>();
            services.AddTransient <IFeedLinkService, ActivityLinkService>();
            services.AddScoped <IMyLinksService, MyLinksService>();
            services.AddScoped <IProfileLinkProvider, ProfileLinkProvider>();
            services.AddScoped <IErrorLinksService, ErrorLinksService>();

            return(services);
        }
Esempio n. 7
0
        public IDependencyCollection Register(IDependencyCollection services)
        {
            services.AddScoped <IIntranetMemberService <IntranetMember>, IntranetMemberService <IntranetMember> >();
            services.AddScoped <ICacheableIntranetMemberService, IntranetMemberService <IntranetMember> >();
            services.AddScoped <IIntranetUserService <IntranetUser>, IntranetUserService <IntranetUser> >();
            services.AddScoped <IIntranetUserContentProvider, IntranetUserContentProvider>();
            services.AddScoped <IUserTagProvider, UserTagProvider>();
            services.AddScoped <IUserTagRelationService, UserTagRelationService>();
            services.AddScoped <IUserTagService, UserTagService>();
            services.AddScoped <IMemberServiceHelper, MemberServiceHelper>();
            services.AddScoped <IProfileService, ProfileService>();
            services.AddScoped <IMentionService, MentionService>();

            return(services);
        }
Esempio n. 8
0
        public IDependencyCollection Register(IDependencyCollection services)
        {
            services.AddSingleton <IFeedTypeProvider>(d => new CentralFeedTypeProvider(typeof(CentralFeedTypeEnum)));
            services.AddScoped <IFeedFilterService, FeedFilterService>();
            services.AddScoped <IGroupFeedService, GroupFeedService>();
            services.AddScoped <ICentralFeedHelper, CentralFeedHelper>();
            services.AddScoped <ICentralFeedService, CentralFeedService>();
            services.AddScoped <IFeedPresentationService, FeedPresentationService>();
            services.AddScoped <IFeedLinkService, ActivityLinkService>();
            services.AddScoped <ICentralFeedContentService, CentralFeedContentService>();
            services.AddScoped <ICentralFeedContentProvider, CentralFeedContentProvider>();
            services.AddScoped <IGridHelper, GridHelper>();
            services.AddScoped <IActivityTabsBuilder, ActivityTabsBuilder>();

            return(services);
        }
        public IDependencyCollection Register(IDependencyCollection services)
        {
            //services.AddScoped<IUserTagProvider, UserTagProvider>();
            services.AddScoped <IUserTagRelationService, UserTagRelationService>();
            // services.AddScoped<IUserTagService, UserTagService>();

            return(services);
        }
Esempio n. 10
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);
        }
Esempio n. 11
0
        public IDependencyCollection Register(IDependencyCollection services)
        {
            services.AddTransient <IDbContextFactory <DbObjectContext> >(provider => new DbContextFactory("umbracoDbDSN"));
            services.AddScoped <DbContext>(provider => provider.GetService <IDbContextFactory <DbObjectContext> >().Create());
            services.AddTransient <IntranetDbContext, DbObjectContext>();
            services.AddTransient <Database>(provider => provider.GetService <DbObjectContext>().Database);
            services.AddTransient(typeof(ISqlRepository <,>), typeof(SqlRepository <,>));
            services.AddTransient(typeof(ISqlRepository <>), typeof(SqlRepository <>));

            return(services);
        }
Esempio n. 12
0
        public IDependencyCollection Register(IDependencyCollection services)
        {
            services.AddScoped <IGroupService, GroupService>();
            services.AddScoped <IGroupContentProvider, GroupContentProvider>();
            services.AddScoped <IGroupMemberService, GroupMemberService>();
            services.AddScoped <IGroupMediaService, GroupMediaService>();
            services.AddScoped <IGroupLinkProvider, GroupLinkProvider>();
            services.AddScoped <IGroupDocumentsService, GroupDocumentsService>();
            services.AddScoped <IGroupHelper, GroupHelper>();

            return(services);
        }
Esempio n. 13
0
        public IDependencyCollection Register(IDependencyCollection services)
        {
            services.AddScoped <ILinkPreviewClient, LinkPreviewClient>();
            services.AddScoped <ILinkPreviewConfiguration, LinkPreviewConfiguration>();
            services.AddScoped <ILinkPreviewUriProvider, LinkPreviewUriProvider>();
            services.AddScoped <ILinkPreviewConfigProvider, LinkPreviewConfigProvider>();
            services.AddScoped <LinkPreviewModelMapper>();
            services.AddScoped <IActivityLinkPreviewService, ActivityLinkPreviewService>();
            services.AddScoped <ClientConnection>();

            return(services);
        }
Esempio n. 14
0
        public IDependencyCollection Register(IDependencyCollection services)
        {
            services.AddTransient <IGroupActivityService, GroupActivityService>();
            services.AddScoped <IActivityPageHelper, ActivityPageHelper>();
            services.AddTransient <IActivityTypeHelper, ActivityTypeHelper>();
            services.AddScoped <IIntranetActivityRepository, IntranetActivityRepository>();
            services.AddScoped <IActivityTypeProvider>(provider => new ActivityTypeProvider(typeof(IntranetActivityTypeEnum)));
            services.AddScoped <IActivitiesServiceFactory, ActivitiesServiceFactory>();
            services.AddTransient <IActivityLocationService, ActivityLocationService>();
            services.AddScoped <IActivityTagsHelper, ActivityTagsHelper>();
            services.AddScoped <IIntranetActivityService, SocialService <Social> >();
            services.AddScoped <IFeedActivityHelper, FeedActivityHelper>();
            services.AddScoped <IActivitySubscribeSettingService, ActivitySubscribeSettingService>();

            return(services);
        }
        public static void AddServiceCollection(this IDependencyCollection dependencies, IServiceCollection services)
        {
            dependencies.AddSingleton(() => services, Binding.Unbound);
            dependencies.AddScoped <IServiceProvider>(p => p.GetRequiredDependency <IServiceCollection>().BuildServiceProvider());

            foreach (ServiceDescriptor service in services)
            {
                Lifetime lifetime = service.Lifetime switch
                {
                    ServiceLifetime.Singleton => Lifetime.Singleton,
                    ServiceLifetime.Scoped => Lifetime.Scoped,
                    ServiceLifetime.Transient => Lifetime.Transient,
                    _ => throw new ArgumentOutOfRangeException()
                };

                dependencies.AddDependency(new ServiceProviderDescriptor(service.ServiceType, lifetime));
            }
        }
    }
Esempio n. 16
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);
        }
Esempio n. 17
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);
        }
        public IDependencyCollection Register(IDependencyCollection services)
        {
            services.AddScoped <IBreadcrumbService, BreadcrumbService>();

            return(services);
        }
Esempio n. 19
0
        public IDependencyCollection Register(IDependencyCollection services)
        {
            services.AddScoped <IOpenGraphService, OpenGraphService>();

            return(services);
        }
Esempio n. 20
0
        public IDependencyCollection Register(IDependencyCollection services)
        {
            services.AddScoped <ILikesService, LikesService>();

            return(services);
        }
Esempio n. 21
0
        public IDependencyCollection Register(IDependencyCollection services)
        {
            //configurations
            services.AddSingleton <IApplicationSettings, ApplicationSettings.ApplicationSettings>();
            services.AddSingleton <IElasticSettings, ApplicationSettings.ApplicationSettings>();

            //services
            services.AddSingleton <IInformationService, InformationService>();
            services.AddSingleton <IDocumentTypeAliasProvider, DocumentTypeProvider>();
            services.AddSingleton <IIntranetMemberGroupService, IntranetMemberGroupService>();
            services.AddSingleton <IPermissionSettingsSchemaProvider, PermissionSettingsSchemaProvider>();
            services.AddSingleton <IContentPageContentProvider, ContentPageContentProvider>();
            services.AddSingleton(i =>
                                  (ILocalizationConfigurationSection)ConfigurationManager.GetSection("localizationConfiguration"));

            services.AddScoped <ICacheService, MemoryCacheService>();
            services.AddScoped <IEmbeddedResourceService, EmbeddedResourceService>();
            services.AddScoped <IMediaHelper, MediaHelper>();
            services.AddScoped <IMediaFolderTypeProvider>(provider => new MediaFolderTypeProvider(typeof(MediaFolderTypeEnum)));
            services.AddScoped <IImageHelper, ImageHelper>();
            services.AddScoped <IVideoConverter, VideoConverter>();
            services.AddScoped <IIntranetMediaService, IntranetMediaService>();
            services.AddScoped <IIntranetMemberGroupProvider, IntranetMemberGroupProvider>();
            services.AddScoped <IPermissionsService, PermissionsService>();
            services.AddScoped <IPermissionActionTypeProvider>(provider =>
                                                               new PermissionActionTypeProvider(typeof(PermissionActionEnum)));
            services.AddScoped <IPermissionResourceTypeProvider>(provider =>
                                                                 new PermissionActivityTypeProvider(typeof(PermissionResourceTypeEnum)));
            services.AddScoped <IDateTimeFormatProvider, DateTimeFormatProvider>();
            services.AddScoped <IClientTimezoneProvider, ClientTimezoneProvider>();
            services.AddScoped <ICookieProvider, CookieProvider>();
            services.AddScoped <ISubscribeService, SubscribeService>();
            services.AddScoped <IAuthenticationService, AuthenticationService>();
            services.AddScoped <IIntranetLocalizationService, LocalizationService>();
            services.AddScoped <ILocalizationCoreService, LocalizationCoreService>();
            services.AddScoped <ILocalizationStorageService, LocalizationStorageService>();
            services.AddScoped <ILocalizationCacheProvider, LocalizationMemoryCacheProvider>();
            services.AddScoped <ILocalizationCacheService, LocalizationCacheService>();
            services.AddScoped <ILocalizationSettingsService, LocalizationSettingsService>();
            services.AddScoped <ILocalizationResourceCacheService, LocalizationResourceCacheService>();
            services.AddScoped <ILightboxHelper, LightboxHelper>();
            services.AddScoped <IUBaselineRequestContext, IntranetRequestContext>();

            services.AddTransient <IVideoHelper, VideoHelper>();
            services.AddTransient <IVideoConverterLogService, VideoConverterLogService>();

            services.AddScoped <IMigrationHistoryService, MigrationHistoryService>();
            services.AddScoped <IMigration, Migration>();

            return(services);
        }