Пример #1
0
        private void ConfigureCustomServices(IFactoriesManager factoriesManager, IDatabaseManager databaseManager)
        {
            factoriesManager.Inject(typeof(IDatabaseManager), databaseManager);
            factoriesManager.Inject(typeof(IFactoriesManager), factoriesManager);

            factoriesManager.AddFactory(new FactoryInfo(new TokenServiceFactory(), typeof(TokenServiceFactory)));
            factoriesManager.AddFactory(new FactoryInfo(new DateServiceFactory(), typeof(DateServiceFactory)));
            factoriesManager.AddFactory(new FactoryInfo(new UserServiceFactory(), typeof(UserServiceFactory)));
            factoriesManager.AddFactory(new FactoryInfo(new LoggerFactory(), typeof(LoggerFactory)));
            factoriesManager.AddFactory(new FactoryInfo(new ResponseServiceFactory(), typeof(ResponseServiceFactory)));
            factoriesManager.AddFactory(new FactoryInfo(new RequestServiceFactory(), typeof(RequestServiceFactory)));
            factoriesManager.AddFactory(new FactoryInfo(new UserActivityServiceFactory(), typeof(UserActivityServiceFactory)));
        }
Пример #2
0
        /// <summary>
        /// This method initializes a factory manager, where all factories which will be needed in the system
        /// are stored. With a factories manager we can get access to any service in any part of the system.
        /// </summary>
        private void ConfigureCustomServices(IFactoriesManager factoriesManager, IDatabaseManager databaseManager)
        {
            factoriesManager.Inject(typeof(IFactoriesManager), factoriesManager);
            factoriesManager.Inject(typeof(IDatabaseManager), databaseManager);

            factoriesManager.AddFactory(new FactoryInfo(new UserServiceFactory(),
                                                        typeof(UserServiceFactory)));
            factoriesManager.AddFactory(new FactoryInfo(new TokenServiceFactory(),
                                                        typeof(TokenServiceFactory)));
            factoriesManager.AddFactory(new FactoryInfo(new LoggerFactory(),
                                                        typeof(LoggerFactory)));
            factoriesManager.AddFactory(new FactoryInfo(new EmailServiceFactory(),
                                                        typeof(EmailServiceFactory)));
            factoriesManager.AddFactory(new FactoryInfo(new LinkServiceFactory(),
                                                        typeof(LinkServiceFactory)));
            factoriesManager.AddFactory(new FactoryInfo(new UserFriendsServiceFactory(),
                                                        typeof(UserFriendsServiceFactory)));
            factoriesManager.AddFactory(new FactoryInfo(new UserActivityServiceFactory(),
                                                        typeof(UserActivityServiceFactory)));
            factoriesManager.AddFactory(new FactoryInfo(new UserFeedServiceFactory(),
                                                        typeof(UserFeedServiceFactory)));
            factoriesManager.AddFactory(new FactoryInfo(new CodesServiceFactory(),
                                                        typeof(CodesServiceFactory)));
            factoriesManager.AddFactory(new FactoryInfo(new RequestServiceFactory(),
                                                        typeof(RequestServiceFactory)));
            factoriesManager.AddFactory(new FactoryInfo(new ResponseServiceFactory(),
                                                        typeof(ResponseServiceFactory)));
            factoriesManager.AddFactory(new FactoryInfo(new DocumentDeskStateServiceFactory(),
                                                        typeof(DocumentDeskStateServiceFactory)));
            factoriesManager.AddFactory(new FactoryInfo(new UserPhotoServiceFactory(),
                                                        typeof(UserPhotoServiceFactory)));
            factoriesManager.AddFactory(new FactoryInfo(new FileServiceFactory(),
                                                        typeof(FileServiceFactory)));
            factoriesManager.AddFactory(new FactoryInfo(new FolderServiceFactory(),
                                                        typeof(FolderServiceFactory)));
            factoriesManager.AddFactory(new FactoryInfo(new UserMainFoldersServiceFactory(),
                                                        typeof(UserMainFoldersServiceFactory)));
            factoriesManager.AddFactory(new FactoryInfo(new DateServiceFactory(), typeof(DateServiceFactory)));
            factoriesManager.AddFactory(new FactoryInfo(new HashServiceFactory(), typeof(HashServiceFactory)));
            factoriesManager.AddFactory(new FactoryInfo(new CacheServiceFactory(), typeof(CacheServiceFactory)));
            factoriesManager.AddFactory(new FactoryInfo(new DocumentServiceFactory(), typeof(DocumentServiceFactory)));
        }
Пример #3
0
        private static void ConfigureCustomServices(IFactoriesManager factoriesManager, IDatabaseManager databaseManager)
        {
            factoriesManager.Inject(typeof(IFactoriesManager), factoriesManager);
            factoriesManager.Inject(typeof(IDatabaseManager), databaseManager);

            factoriesManager.AddFactory(new FactoryInfo(new DateServiceFactory(), typeof(DateServiceFactory)));
            factoriesManager.AddFactory(new FactoryInfo(new RequestServiceFactory(), typeof(RequestServiceFactory)));
            factoriesManager.AddFactory(new FactoryInfo(new ResponseServiceFactory(), typeof(ResponseServiceFactory)));
            factoriesManager.AddFactory(new FactoryInfo(new FileToDocumentServiceFactory(), typeof(FileToDocumentServiceFactory)));
            factoriesManager.AddFactory(new FactoryInfo(new DocumentStructureServiceFactory(), typeof(DocumentStructureServiceFactory)));
            factoriesManager.AddFactory(new FactoryInfo(new DocumentServiceFactory(), typeof(DocumentServiceFactory)));
            factoriesManager.AddFactory(new FactoryInfo(new LoggerFactory(), typeof(LoggerFactory)));
            factoriesManager.AddFactory(new FactoryInfo(new TokenServiceFactory(), typeof(TokenServiceFactory)));
            factoriesManager.AddFactory(new FactoryInfo(new DocumentElementServiceFactory(), typeof(DocumentElementServiceFactory)));
            factoriesManager.AddFactory(new FactoryInfo(new TemplateServiceFactory(), typeof(TemplateServiceFactory)));
            factoriesManager.AddFactory(new FactoryInfo(new UserServiceFactory(), typeof(UserServiceFactory)));
            factoriesManager.AddFactory(new FactoryInfo(new ProjectServiceFactory(), typeof(ProjectServiceFactory)));
            factoriesManager.AddFactory(new FactoryInfo(new UserPhotoServiceFactory(), typeof(UserPhotoServiceFactory)));
            factoriesManager.AddFactory(new FactoryInfo(new HashServiceFactory(), typeof(HashServiceFactory)));
            factoriesManager.AddFactory(new FactoryInfo(new CacheServiceFactory(), typeof(CacheServiceFactory)));
            factoriesManager.AddFactory(new FactoryInfo(new WordServiceFactory(), typeof(WordServiceFactory)));
            factoriesManager.AddFactory(new FactoryInfo(new LinkServiceFactory(), typeof(LinkServiceFactory)));
        }