本文整理汇总了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;
}
示例2: LanguageInterceptor
public LanguageInterceptor(IPersister persister, ContentActivator activator, IWebContext context, ILanguageGateway gateway)
{
this.persister = persister;
this.activator = activator;
this.context = context;
this.gateway = gateway;
}
示例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;
};
}
}
示例4: LanguageInterceptor
public LanguageInterceptor(IPersister persister, IDefinitionManager definitions, IWebContext context, ILanguageGateway gateway)
{
this.persister = persister;
this.definitions = definitions;
this.context = context;
this.gateway = gateway;
}
示例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();
}
示例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;
}
示例7: Repository
public Repository(IPersister<List<CcdLevel>> persister)
{
_logger.Trace("Creating repository");
_persister = persister;
Initialize();
}
示例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;
};
}
示例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);
}
示例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();
}
示例11: FolderNodeProvider
public FolderNodeProvider(IFileSystem fs, IPersister persister, IDependencyInjector dependencyInjector)
{
UploadFolderPaths = new FolderPair[0];
this.fs = fs;
this.persister = persister;
this.dependencyInjector = dependencyInjector;
}
示例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);
}
示例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;
};
}
示例14: Navigator
public Navigator(IPersister persister, IHost host, VirtualNodeFactory nodes, ContentSource sources)
{
this.persister = persister;
this.host = host;
this.virtualNodes = nodes;
this.sources = sources;
}
示例15: Importer
public Importer(IPersister persister, IItemXmlReader reader, IFileSystem fs)
{
this.persister = persister;
this.reader = reader;
this.fs = fs;
//TODO: Initialize 'logger' ---> this.logger =;
}