本文整理汇总了C#中IDocumentStore.ExecuteIndex方法的典型用法代码示例。如果您正苦于以下问题:C# IDocumentStore.ExecuteIndex方法的具体用法?C# IDocumentStore.ExecuteIndex怎么用?C# IDocumentStore.ExecuteIndex使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IDocumentStore
的用法示例。
在下文中一共展示了IDocumentStore.ExecuteIndex方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: UseRavenDB
public static void UseRavenDB(this AppConfigurator configurator, IDocumentStore documentStore)
{
documentStore.ExecuteIndex(new StoredEventIndex());
documentStore.Conventions.JsonContractResolver = new Taro.RavenDB.Serialization.AggregateRootContractResolver();
var runtime = configurator.AppRuntime;
runtime.Container.Register<IDomainDbSession>(_ => new RavenDomainDbSession(documentStore.OpenSession()));
runtime.Container.Register<IDomainRepository>(_ => new RavenDomainRepository(_.Resolve<IDomainDbSession>(), _.Resolve<IRelayWorker>()));
}
示例2: StoreInRavenDb
/// <summary>
/// Configures Rebus to use RavenDb to store timeouts.
/// </summary>
public static void StoreInRavenDb(this StandardConfigurer<ITimeoutManager> configurer,
IDocumentStore documentStore)
{
if (configurer == null) throw new ArgumentNullException("configurer");
if (documentStore == null) throw new ArgumentNullException("documentStore");
documentStore.ExecuteIndex(new TimeoutIndex());
configurer.Register(c =>
{
var timeoutManager = new RavenDbTimeoutManager(documentStore);
return timeoutManager;
});
}
示例3: StoreInRavenDb
/// <summary>
/// Configures Rebus to use RavenDb to store timeouts.
/// </summary>
public static void StoreInRavenDb(this StandardConfigurer<ITimeoutManager> configurer, IDocumentStore documentStore)
{
if (configurer == null) throw new ArgumentNullException(nameof(configurer));
if (documentStore == null) throw new ArgumentNullException(nameof(documentStore));
documentStore.ExecuteIndex(new TimeoutIndex());
configurer.Register(c =>
{
var rebusLoggerFactory = c.Get<IRebusLoggerFactory>();
var timeoutManager = new RavenDbTimeoutManager(documentStore, rebusLoggerFactory);
return timeoutManager;
});
}