/// <summary>
        /// Create a new uSyncDashboardApi Controller (via DI)
        /// </summary>
        public uSyncDashboardApiController(
            IConfiguration configuration,
            AppCaches appCaches,
            IWebHostEnvironment hostEnvironment,
            ILocalizedTextService textService,
            ILogger <uSyncDashboardApiController> logger,
            ITypeFinder typeFinder,
            uSyncService uSyncService,
            SyncHandlerFactory syncHandlerFactory,
            IHubContext <SyncHub> hubContext,
            uSyncConfigService uSyncConfig)
        {
            this.appCaches       = appCaches;
            this.hostEnvironment = hostEnvironment;
            this.textService     = textService;
            this.logger          = logger;

            this.typeFinder = typeFinder;

            this.uSyncService   = uSyncService;
            this.handlerFactory = syncHandlerFactory;
            this.hubContext     = hubContext;

            this.uSyncConfig = uSyncConfig;

            _configuration = configuration;
        }
Пример #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="uSyncContentService"/> class.
 /// </summary>
 /// <param name="logger">The logger.</param>
 /// <param name="contentService">The content service.</param>
 /// <param name="appCaches">The application caches.</param>
 /// <param name="entityService">The entity service.</param>
 /// <param name="shortStringHelper">The short string helper.</param>
 /// <param name="uSyncFileService">The u synchronize file service.</param>
 /// <param name="uSyncEventService">The u synchronize event service.</param>
 /// <param name="uSyncConfigService">The u synchronize configuration service.</param>
 /// <param name="syncItemFactory">The synchronize item factory.</param>
 public uSyncContentService(ILogger <ContentHandler> logger, IContentService contentService, AppCaches appCaches, IEntityService entityService, IShortStringHelper shortStringHelper, SyncFileService usyncFileService, uSyncEventService usyncEventService, uSyncConfigService usyncConfigService, ISyncItemFactory syncItemFactory)
 {
     _logger             = logger;
     _contentService     = contentService;
     _appCaches          = appCaches;
     _entityService      = entityService;
     _shortStringHelper  = shortStringHelper;
     _usyncFileService   = usyncFileService;
     _usyncEventService  = usyncEventService;
     _usyncConfigService = usyncConfigService;
     _syncItemFactory    = syncItemFactory;
 }
Пример #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="uSyncMediaTypeService"/> class.
 /// </summary>
 /// <param name="logger">The logger.</param>
 /// <param name="mediaTypeService">The media type service.</param>
 /// <param name="appCaches">The application caches.</param>
 /// <param name="entityService">The entity service.</param>
 /// <param name="shortStringHelper">The short string helper.</param>
 /// <param name="uSyncFileService">The u synchronize file service.</param>
 /// <param name="uSyncEventService">The u synchronize event service.</param>
 /// <param name="uSyncConfigService">The u synchronize configuration service.</param>
 /// <param name="syncItemFactory">The synchronize item factory.</param>
 public uSyncMediaTypeService(ILogger <MediaTypeHandler> logger, IMediaTypeService mediaTypeService, AppCaches appCaches, IEntityService entityService, IShortStringHelper shortStringHelper, SyncFileService uSyncFileService, uSyncEventService uSyncEventService, uSyncConfigService uSyncConfigService, ISyncItemFactory syncItemFactory)
 {
     _logger             = logger;
     _mediaTypeService   = mediaTypeService;
     _appCaches          = appCaches;
     _entityService      = entityService;
     _shortStringHelper  = shortStringHelper;
     _uSyncFileService   = uSyncFileService;
     _uSyncEventService  = uSyncEventService;
     _uSyncConfigService = uSyncConfigService;
     _syncItemFactory    = syncItemFactory;
 }
Пример #4
0
 /// <summary>
 /// Base constructor, should never be called directly
 /// </summary>
 protected ContentHandlerBase(
     ILogger <ContentHandlerBase <TObject, TService> > logger,
     IEntityService entityService,
     AppCaches appCaches,
     IShortStringHelper shortStringHelper,
     SyncFileService syncFileService,
     uSyncEventService mutexService,
     uSyncConfigService uSyncConfigService,
     ISyncItemFactory syncItemFactory)
     : base(logger, entityService, appCaches, shortStringHelper, syncFileService, mutexService, uSyncConfigService, syncItemFactory)
 {
 }
Пример #5
0
 /// <inheritdoc/>
 public FirstBootMigration(
     IMigrationContext context,
     IUmbracoContextFactory umbracoContextFactory,
     uSyncConfigService uSyncConfig,
     uSyncService uSyncService,
     ILogger <FirstBootMigration> logger) : base(context)
 {
     _umbracoContextFactory = umbracoContextFactory;
     _uSyncConfig           = uSyncConfig;
     _uSyncService          = uSyncService;
     _logger = logger;
 }
Пример #6
0
 /// <inheritdoc/>
 public SyncHandlerBase(
     ILogger <SyncHandlerBase <TObject, TService> > logger,
     IEntityService entityService,
     AppCaches appCaches,
     IShortStringHelper shortStringHelper,
     SyncFileService syncFileService,
     uSyncEventService mutexService,
     uSyncConfigService uSyncConfig,
     ISyncItemFactory syncItemFactory)
     : base(logger, appCaches, shortStringHelper, syncFileService, mutexService, uSyncConfig, syncItemFactory)
 {
     this.entityService = entityService;
 }
Пример #7
0
        /// <inheritdoc/>
        public uSyncServerVariablesHandler(LinkGenerator linkGenerator, UriUtility uriUtility,
                                           IOptions <GlobalSettings> globalSettings,
                                           uSyncConfigService uSyncConfigService,
                                           IHostingEnvironment hostingEnvironment,
                                           uSyncHubRoutes hubRoutes)
        {
            this.linkGenerator  = linkGenerator;
            this.uriUtility     = uriUtility;
            this.uSyncConfig    = uSyncConfigService;
            this.uSyncHubRoutes = hubRoutes;

            umbracoMvcArea = globalSettings.Value.GetUmbracoMvcArea(hostingEnvironment);
        }
Пример #8
0
 /// <inheritdoc/>
 public MediaHandler(
     ILogger <MediaHandler> logger,
     IEntityService entityService,
     IMediaService mediaService,
     AppCaches appCaches,
     IShortStringHelper shortStringHelper,
     SyncFileService syncFileService,
     uSyncEventService mutexService,
     uSyncConfigService uSyncConfigService,
     ISyncItemFactory syncItemFactory)
     : base(logger, entityService, appCaches, shortStringHelper, syncFileService, mutexService, uSyncConfigService, syncItemFactory)
 {
     this.mediaService = mediaService;
 }
Пример #9
0
 /// <inheritdoc/>
 public DomainHandler(
     ILogger <DomainHandler> logger,
     IEntityService entityService,
     IDomainService domainService,
     AppCaches appCaches,
     IShortStringHelper shortStringHelper,
     SyncFileService syncFileService,
     uSyncEventService mutexService,
     uSyncConfigService configService,
     ISyncItemFactory syncItemFactory)
     : base(logger, entityService, appCaches, shortStringHelper, syncFileService, mutexService, configService, syncItemFactory)
 {
     this.domainService = domainService;
 }
Пример #10
0
 /// <inheritdoc/>
 public TemplateHandler(
     ILogger <TemplateHandler> logger,
     IEntityService entityService,
     IFileService fileService,
     AppCaches appCaches,
     IShortStringHelper shortStringHelper,
     SyncFileService syncFileService,
     uSyncEventService mutexService,
     uSyncConfigService uSyncConfig,
     ISyncItemFactory syncItemFactory)
     : base(logger, entityService, appCaches, shortStringHelper, syncFileService, mutexService, uSyncConfig, syncItemFactory)
 {
     this.fileService = fileService;
 }
Пример #11
0
 /// <inheritdoc/>
 public RelationTypeHandler(
     ILogger <RelationTypeHandler> logger,
     IEntityService entityService,
     IRelationService relationService,
     AppCaches appCaches,
     IShortStringHelper shortStringHelper,
     SyncFileService syncFileService,
     uSyncEventService mutexService,
     uSyncConfigService uSyncConfigService,
     ISyncItemFactory syncItemFactory)
     : base(logger, entityService, appCaches, shortStringHelper, syncFileService, mutexService, uSyncConfigService, syncItemFactory)
 {
     this.relationService = relationService;
 }
Пример #12
0
 /// <summary>
 ///  Constructor - loaded via DI
 /// </summary>
 public ContentTypeHandler(
     ILogger <ContentTypeHandler> logger,
     IEntityService entityService,
     IContentTypeService contentTypeService,
     AppCaches appCaches,
     IShortStringHelper shortStringHelper,
     SyncFileService syncFileService,
     uSyncEventService mutexService,
     uSyncConfigService uSyncConfig,
     ISyncItemFactory syncItemFactory)
     : base(logger, entityService, appCaches, shortStringHelper, syncFileService, mutexService, uSyncConfig, syncItemFactory)
 {
     this.contentTypeService = contentTypeService;
 }
Пример #13
0
 /// <inheritdoc/>
 public DictionaryHandler(
     ILogger <DictionaryHandler> logger,
     IEntityService entityService,
     ILocalizationService localizationService,
     AppCaches appCaches,
     IShortStringHelper shortStringHelper,
     SyncFileService syncFileService,
     uSyncEventService mutexService,
     uSyncConfigService uSyncConfigService,
     ISyncItemFactory syncItemFactory)
     : base(logger, entityService, appCaches, shortStringHelper, syncFileService, mutexService, uSyncConfigService, syncItemFactory)
 {
     this.localizationService = localizationService;
 }
Пример #14
0
        /// <summary>
        ///  Handler constrcutor Loaded via DI
        /// </summary>
        public ContentTemplateHandler(
            ILogger <ContentTemplateHandler> logger,
            IEntityService entityService,
            IContentService contentService,
            AppCaches appCaches,
            IShortStringHelper shortStringHelper,
            SyncFileService syncFileService,
            uSyncEventService mutexService,
            uSyncConfigService uSyncConfigService,
            ISyncItemFactory syncItemFactory)
            : base(logger, entityService, appCaches, shortStringHelper, syncFileService, mutexService, uSyncConfigService, syncItemFactory)
        {
            this.contentService = contentService;

            // make sure we load up the template serializer - because we need that one, not the normal content one.
            this.serializer = syncItemFactory.GetSerializer <IContent>("contentTemplateSerializer");
        }
Пример #15
0
        /// <summary>
        /// Constructor, called via DI
        /// </summary>
        public ContentHandler(
            ILogger <ContentHandler> logger,
            IEntityService entityService,
            IContentService contentService,
            AppCaches appCaches,
            IShortStringHelper shortStringHelper,
            SyncFileService syncFileService,
            uSyncEventService mutexService,
            uSyncConfigService uSyncConfigService,
            ISyncItemFactory syncItemFactory)
            : base(logger, entityService, appCaches, shortStringHelper, syncFileService, mutexService, uSyncConfigService, syncItemFactory)
        {
            this.contentService = contentService;

            // make sure we get the default content serializer (not just the first one that loads)
            this.serializer = syncItemFactory.GetSerializer <IContent>("ContentSerializer");
        }
Пример #16
0
        /// <summary>
        /// Generate a new uSyncApplicationStartingHandler object
        /// </summary>
        public uSyncApplicationStartingHandler(
            ILogger <uSyncApplicationStartingHandler> logger,
            IRuntimeState runtimeState,
            IServerRoleAccessor serverRegistrar,
            IUmbracoContextFactory umbracoContextFactory,
            uSyncConfigService uSyncConfigService,
            SyncFileService syncFileService,
            uSyncService uSyncService)
        {
            this._runtimeState    = runtimeState;
            this._serverRegistrar = serverRegistrar;

            this._umbracoContextFactory = umbracoContextFactory;

            this._logger = logger;

            this._uSyncConfig = uSyncConfigService;

            this._syncFileService = syncFileService;
            this._uSyncService    = uSyncService;
        }
Пример #17
0
        /// <summary>
        ///  Create a new uSyncService (done via DI)
        /// </summary>
        public uSyncService(
            ILogger <uSyncService> logger,
            IEventAggregator eventAggregator,
            uSyncConfigService uSyncConfigService,
            SyncHandlerFactory handlerFactory,
            SyncFileService syncFileService,
            uSyncEventService mutexService,
            AppCaches appCaches)
        {
            this._logger = logger;

            this._eventAggregator = eventAggregator;

            this._uSyncConfig     = uSyncConfigService;
            this._handlerFactory  = handlerFactory;
            this._syncFileService = syncFileService;
            this._mutexService    = mutexService;

            this._appCache = appCaches.RuntimeCache;

            uSyncTriggers.DoExport += USyncTriggers_DoExport;
            uSyncTriggers.DoImport += USyncTriggers_DoImport;
        }