当前位置: 首页>>代码示例>>C#>>正文


C# IPersister类代码示例

本文整理汇总了C#中IPersister的典型用法代码示例。如果您正苦于以下问题:C# IPersister类的具体用法?C# IPersister怎么用?C# IPersister使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IPersister类属于命名空间,在下文中一共展示了IPersister类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ContentMessageSource

		public ContentMessageSource(IPersister persister, IIntegrityManager integrity, ISecurityManager security, IWebContext context)
		{
			this.persister = persister;
			this.integrity = integrity;
			this.security = security;
			this.context = context;
		}
开发者ID:EzyWebwerkstaden,项目名称:n2cms,代码行数:7,代码来源:ContentMessageSource.cs

示例2: LanguageInterceptor

 public LanguageInterceptor(IPersister persister, ContentActivator activator, IWebContext context, ILanguageGateway gateway)
 {
     this.persister = persister;
     this.activator = activator;
     this.context = context;
     this.gateway = gateway;
 }
开发者ID:AnonymousRetard,项目名称:n2cms,代码行数:7,代码来源:LanguageInterceptor.cs

示例3: ContentChangeTracker

        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;
                };
            }
        }
开发者ID:Jobu,项目名称:n2cms,代码行数:31,代码来源:ContentChangeTracker.cs

示例4: LanguageInterceptor

 public LanguageInterceptor(IPersister persister, IDefinitionManager definitions, IWebContext context, ILanguageGateway gateway)
 {
     this.persister = persister;
     this.definitions = definitions;
     this.context = context;
     this.gateway = gateway;
 }
开发者ID:spmason,项目名称:n2cms,代码行数:7,代码来源:LanguageInterceptor.cs

示例5: CommandFactory

        public CommandFactory(IPersister persister, ISecurityManager security, IVersionManager versionMaker, IEditUrlManager editUrlManager, IContentAdapterProvider adapters, StateChanger changer)
        {
            this.persister = persister;
            makeVersionOfMaster = On.Master(new MakeVersionCommand(versionMaker));
            replaceMaster = new ReplaceMasterCommand(versionMaker);
            makeVersion = new MakeVersionCommand(versionMaker);
            useNewVersion = new UseNewVersionCommand(versionMaker);
            updateObject = new UpdateObjectCommand();
            delete = new DeleteCommand(persister.Repository);
            showPreview = new RedirectToPreviewCommand(adapters);
            showEdit = new RedirectToEditCommand(editUrlManager);
            useMaster = new UseMasterCommand();
            clone = new CloneCommand();
            validate = new ValidateCommand();
            this.security = security;
            save = new SaveCommand(persister);
            incrementVersionIndex = new IncrementVersionIndexCommand(versionMaker);
            draftState = new UpdateContentStateCommand(changer, ContentState.Draft);
            publishedState = new UpdateContentStateCommand(changer, ContentState.Published);
            saveActiveContent = new ActiveContentSaveCommand();
			moveToPosition = new MoveToPositionCommand();
			unpublishedDate = new EnsureNotPublishedCommand();
			publishedDate = new EnsurePublishedCommand();
			updateReferences = new UpdateReferencesCommand();
        }
开发者ID:navneetccna,项目名称:n2cms,代码行数:25,代码来源:CommandFactory.cs

示例6: MongoInstallationManager

 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;
 }
开发者ID:JohnsonYuan,项目名称:n2cms,代码行数:7,代码来源:MongoInstallationManager.cs

示例7: Repository

        public Repository(IPersister<List<CcdLevel>> persister)
        {
            _logger.Trace("Creating repository");
            _persister = persister;

            Initialize();
        }
开发者ID:PapaMufflon,项目名称:CcdAddIn,代码行数:7,代码来源:Repository.cs

示例8: ContentChangeTracker

        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;
            };
        }
开发者ID:JohnsonYuan,项目名称:n2cms,代码行数:28,代码来源:ContentChangeTracker.cs

示例9: ExternalContentRepository

 public ExternalContentRepository(ContainerRepository<ExternalItem> containerRepository, IPersister persister, ContentActivator activator, EditSection config)
 {
     this.containerRepository = containerRepository;
     this.persister = persister;
     this.activator = activator;
     externalItemType = Type.GetType(config.Externals.ExternalItemType) ?? typeof(ExternalItem);
 }
开发者ID:GrimaceOfDespair,项目名称:n2cms,代码行数:7,代码来源:ExternalContentRepository.cs

示例10: CommandFactory

        public CommandFactory(IPersister persister, ISecurityManager security, IVersionManager versionMaker, IEditUrlManager editUrlManager, IContentAdapterProvider adapters, StateChanger changer)
        {
            //this.persister = persister;
            //makeVersionOfMaster = On.Master(new MakeVersionCommand(versionMaker));
            //showEdit = new RedirectToEditCommand(editUrlManager);
            //clone = new CloneCommand();
            //unpublishedDate = new EnsureNotPublishedCommand(); // moved to StateChanger
            //ensurePublishedDate = new EnsurePublishedCommand();  // moved to StateChanger

            this.security = security;
            
            save = new SaveCommand(persister);
            delete = new DeleteCommand(persister.Repository);

            replaceMaster = new ReplaceMasterCommand(versionMaker);
            makeVersion = new MakeVersionCommand(versionMaker);
            useDraftCmd = new UseDraftCommand(versionMaker);
            saveOnPageVersion = new SaveOnPageVersionCommand(versionMaker);

            draftState = new UpdateContentStateCommand(changer, ContentState.Draft);
            publishedState = new UpdateContentStateCommand(changer, ContentState.Published);

            updateObject = new UpdateObjectCommand();
            useMaster = new UseMasterCommand();
            validate = new ValidateCommand();
            saveActiveContent = new ActiveContentSaveCommand();
			moveToPosition = new MoveToPositionCommand();
			updateReferences = new UpdateReferencesCommand();
        }
开发者ID:grbbod,项目名称:drconnect-jungo,代码行数:29,代码来源:CommandFactory.cs

示例11: FolderNodeProvider

		public FolderNodeProvider(IFileSystem fs, IPersister persister, IDependencyInjector dependencyInjector)
		{
			UploadFolderPaths = new FolderPair[0];
			this.fs = fs;
			this.persister = persister;
			this.dependencyInjector = dependencyInjector;
		}
开发者ID:navneetccna,项目名称:n2cms,代码行数:7,代码来源:FolderNodeProvider.cs

示例12: ContentCacheDependency

 public ContentCacheDependency(IPersister persister)
 {
     this.persister = persister;
     persister.ItemMoved += new EventHandler<DestinationEventArgs>(persister_ItemMoved);
     persister.ItemSaved += new EventHandler<ItemEventArgs>(persister_ItemSaved);
     persister.ItemDeleted += new EventHandler<ItemEventArgs>(persister_ItemDeleted);
 }
开发者ID:EzyWebwerkstaden,项目名称:n2cms,代码行数:7,代码来源:ContentCacheDependency.cs

示例13: LinkGenerator

        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;
            };
        }
开发者ID:grbbod,项目名称:drconnect-jungo,代码行数:29,代码来源:LinkGenerator.cs

示例14: Navigator

		public Navigator(IPersister persister, IHost host, VirtualNodeFactory nodes, ContentSource sources)
		{
			this.persister = persister;
			this.host = host;
			this.virtualNodes = nodes;
			this.sources = sources;
		}
开发者ID:nagarjunachallapalli,项目名称:n2cms,代码行数:7,代码来源:Navigator.cs

示例15: Importer

        public Importer(IPersister persister, IItemXmlReader reader, IFileSystem fs)
        {
			this.persister = persister;
			this.reader = reader;
            this.fs = fs;
	        //TODO: Initialize 'logger' ---> this.logger =;
        }
开发者ID:nicklv,项目名称:n2cms,代码行数:7,代码来源:Importer.cs


注:本文中的IPersister类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。