public ContentChangeTracker(IIndexer indexer, IPersister persister, IWorker worker, ConnectionMonitor connection, IErrorNotifier errors, DatabaseSection config) { this.indexer = indexer; this.persister = persister; this.worker = worker; this.errors = errors; this.async = config.Search.AsyncIndexing; this.handleErrors = config.Search.HandleErrors; RetryInterval = TimeSpan.FromMinutes(2); if(config.Search.Enabled) { connection.Online += delegate { persister.ItemSaved += persister_ItemSaved; persister.ItemMoving += persister_ItemMoving; persister.ItemMoved += persister_ItemMoved; persister.ItemCopied += persister_ItemCopied; persister.ItemDeleted += persister_ItemDeleted; }; connection.Offline += delegate { persister.ItemSaved -= persister_ItemSaved; persister.ItemMoving -= persister_ItemMoving; persister.ItemMoved -= persister_ItemMoved; persister.ItemCopied -= persister_ItemCopied; persister.ItemDeleted -= persister_ItemDeleted; }; } }
public LinkGenerator(IPersister persister, ConnectionMonitor connection, CacheWrapper cacheWrapper, IRequestLogger logger) { _logger = logger; // DON'T USE DISTRIBUTED CACHE FOR N2 internal data // _urlCache = cacheService.GetCache<string>(new CacheConfig("LinkGenerator_urlCache", 1800)); _urlCache = new HttpRuntimeCacheWrapper<string>("LinkGenerator_urlCache", cacheWrapper); _itemCache = new HttpRuntimeCacheWrapper<object>("LinkGenerator_urlCache_item", cacheWrapper); // hook up to persister events connection.Online += delegate { persister.ItemSaved += persister_ItemSaved; persister.ItemMoving += persister_ItemMoving; persister.ItemMoved += persister_ItemMoved; persister.ItemCopied += persister_ItemCopied; persister.ItemDeleted += persister_ItemDeleted; persister.FlushCache += persister_ItemInvalidated; }; connection.Offline += delegate { persister.ItemSaved -= persister_ItemSaved; persister.ItemMoving -= persister_ItemMoving; persister.ItemMoved -= persister_ItemMoved; persister.ItemCopied -= persister_ItemCopied; persister.ItemDeleted -= persister_ItemDeleted; persister.FlushCache -= persister_ItemInvalidated; }; }
public XmlInstallationManager(IHost host, IPersister persister, XmlContentRepository repository, ConnectionMonitor connectionContext, Importer importer, IWebContext webContext, ContentActivator activator) : base(connectionContext, importer, webContext, persister, activator) { this.host = host; this.persister = persister; this.repository = repository; }
public MongoInstallationManager(MongoDatabaseProvider database, IHost host, IPersister persister, ConnectionMonitor connectionContext, Importer importer, IWebContext webContext, ContentActivator activator) : base(connectionContext, importer, webContext, persister, activator) { this.database = database; this.host = host; this.persister = persister; }
public ContentChangeTracker(IAsyncIndexer indexer, IPersister persister, ConnectionMonitor connection, DatabaseSection config) { this.indexer = indexer; if (!config.Search.Enabled) return; if (!string.IsNullOrEmpty(config.Search.IndexOnMachineNamed) && config.Search.IndexOnMachineNamed != Environment.MachineName) return; connection.Online += delegate { IsMonitoring = true; persister.ItemSaved += persister_ItemSaved; persister.ItemMoving += persister_ItemMoving; persister.ItemMoved += persister_ItemMoved; persister.ItemCopied += persister_ItemCopied; persister.ItemDeleted += persister_ItemDeleted; }; connection.Offline += delegate { IsMonitoring = false; persister.ItemSaved -= persister_ItemSaved; persister.ItemMoving -= persister_ItemMoving; persister.ItemMoved -= persister_ItemMoved; persister.ItemCopied -= persister_ItemCopied; persister.ItemDeleted -= persister_ItemDeleted; }; }
public InstallationManager(ConnectionMonitor connectionContext, Importer importer, IWebContext webContext, IPersister persister, ContentActivator activator) { this.connectionContext = connectionContext; this.importer = importer; this.webContext = webContext; this.persister = persister; this.activator = activator; }
/// <summary> /// Initializes a new instance of the <see cref="VirtualFolderInitializer"/> class. /// </summary> /// <param name="host">The host.</param> /// <param name="persister">The persister.</param> /// <param name="fs">The fs.</param> /// <param name="virtualNodes">The virtual nodes.</param> /// <param name="editConfig">The edit config.</param> public VirtualFolderInitializer(IHost host, IPersister persister, IFileSystem fs, VirtualNodeFactory virtualNodes, ConnectionMonitor monitor, UploadFolderSource folderSource, FolderNodeProvider nodeProvider) { this.host = host; this.persister = persister; this.virtualNodes = virtualNodes; this.monitor = monitor; this.folderSource = folderSource; this.nodeProvider = nodeProvider; }
/// <summary> /// Initializes a new instance of the <see cref="VirtualFolderInitializer"/> class. /// </summary> /// <param name="host">The host.</param> /// <param name="persister">The persister.</param> /// <param name="fs">The fs.</param> /// <param name="virtualNodes">The virtual nodes.</param> /// <param name="editConfig">The edit config.</param> public VirtualFolderInitializer(IHost host, IPersister persister, IFileSystem fs, VirtualNodeFactory virtualNodes, ConnectionMonitor monitor, EditSection editConfig, ImageSizeCache imageSizes, FolderNodeProvider nodeProvider) { this.host = host; this.persister = persister; this.virtualNodes = virtualNodes; this.monitor = monitor; this.folders = editConfig.UploadFolders; this.nodeProvider = nodeProvider; }
public InstallationManager(IHost host, DefinitionMap map, ContentActivator activator, Importer importer, IPersister persister, ISessionProvider sessionProvider, IConfigurationBuilder configurationBuilder, IWebContext webContext, ConnectionMonitor connectionContext) { this.host = host; this.map = map; this.activator = activator; this.importer = importer; this.persister = persister; this.sessionProvider = sessionProvider; this.configurationBuilder = configurationBuilder; this.webContext = webContext; this.connectionContext = connectionContext; }
public InstallationManager(IHost host, DefinitionMap map, ContentActivator activator, Importer importer, IPersister persister, ISessionProvider sessionProvider, IConfigurationBuilder configurationBuilder, IWebContext webContext, ConnectionMonitor connectionContext, DatabaseSection config) { this.host = host; this.map = map; this.activator = activator; this.importer = importer; this.persister = persister; this.sessionProvider = sessionProvider; this.configurationBuilder = configurationBuilder; this.webContext = webContext; this.connectionContext = connectionContext; this.isDatabaseFileSystemEnbled = config.Files.StorageLocation == FileStoreLocation.Database; }
public Tracker(Persistence.IPersister persister, IRepository<ContentDetail> detailRepository, N2.Web.IUrlParser urlParser, ConnectionMonitor connections, N2.Web.IErrorNotifier errorHandler) { this.persister = persister; this.detailRepository = detailRepository; this.urlParser = urlParser; this.errorHandler = errorHandler; connections.Online += delegate { persister.ItemSaving += persister_ItemSaving; }; connections.Offline += delegate { persister.ItemSaving -= persister_ItemSaving; }; }
public UrlParser(IPersister persister, IWebContext webContext, IHost host, N2.Plugin.ConnectionMonitor connections, HostSection config) { if (host == null) { throw new ArgumentNullException("host"); } IsOnline = connections.IsConnected ?? true; connections.Online += (s, a) => IsOnline = true; connections.Offline += (s, a) => IsOnline = false; this.persister = persister; this.webContext = webContext; this.host = host; ignoreExistingFiles = config.Web.IgnoreExistingFiles; }
public ContentPartTemplateProvider( ContentActivator activator, DefinitionBuilder builder, IProvider<HttpContextBase> httpContextProvider, //IProvider<VirtualPathProvider> vppProvider, //IRepository<ContentItem> repository, ConnectionMonitor connection, IHost host) { _activator = activator; _builder = builder; _httpContextProvider = httpContextProvider; _connection = connection; //_vpp = vppProvider.Get(); //_repository = repository; _host = host; }
public Tracker(Persistence.IPersister persister, N2.Web.IUrlParser urlParser, ConnectionMonitor connections, N2.Web.IErrorNotifier errorHandler, Configuration.EditSection config) { this.repository = persister.Repository; this.urlParser = urlParser; this.errorHandler = errorHandler; if (config.LinkTracker.Enabled) { connections.Online += delegate { persister.ItemSaving += persister_ItemSaving; }; connections.Offline += delegate { persister.ItemSaving -= persister_ItemSaving; }; } }
public MultipleSitesInitializer(IPersister persister, IHost host, ISitesProvider sitesProvider, ConnectionMonitor context, HostSection config, IDefinitionManager ignored) { Debug.WriteLine("MultipleSitesInitializer"); if (config.MultipleSites && config.DynamicSites) { context.Online += delegate { host.AddSites(sitesProvider.GetSites()); persister.ItemSaved += delegate(object sender, ItemEventArgs e) { if (e.AffectedItem is ISitesSource) { IList<Site> sites = Host.ExtractSites(config); sites = Host.Union(sites, sitesProvider.GetSites()); host.ReplaceSites(host.DefaultSite, sites); } }; }; } }
public ContentChangeTracker(IAsyncIndexer indexer, IPersister persister, ConnectionMonitor connection, DatabaseSection config) { this.indexer = indexer; if(config.Search.Enabled) { connection.Online += delegate { persister.ItemSaved += persister_ItemSaved; persister.ItemMoving += persister_ItemMoving; persister.ItemMoved += persister_ItemMoved; persister.ItemCopied += persister_ItemCopied; persister.ItemDeleted += persister_ItemDeleted; }; connection.Offline += delegate { persister.ItemSaved -= persister_ItemSaved; persister.ItemMoving -= persister_ItemMoving; persister.ItemMoved -= persister_ItemMoved; persister.ItemCopied -= persister_ItemCopied; persister.ItemDeleted -= persister_ItemDeleted; }; } }
public TraceReaderMessageProvider(N2.Configuration.ConfigurationManagerWrapper config, ConnectionMonitor monitor) { monitor.Online += monitor_Online; reportingLevel = config.Sections.Management.Collaboration.ErrorReportingLevel; }
public RavenInstallationManager(IHost host, DefinitionMap map, ContentActivator activator, Importer importer, IPersister persister, ISessionProvider sessionProvider, IConfigurationBuilder configurationBuilder, IWebContext webContext, ConnectionMonitor connectionContext, DatabaseSection config, RavenConnectionProvider cp) : base(connectionContext, importer, webContext, persister, activator) { this.cp = cp; }
public MultipleSitesParser(IPersister persister, IWebContext webContext, IHost host, N2.Plugin.ConnectionMonitor connections, HostSection config) : base(persister, webContext, host, connections, config) { }