本文整理汇总了C#中EventStore.Projections.Core.Services.Processing.ProjectionNamesBuilder.GetPartitionCatalogStreamName方法的典型用法代码示例。如果您正苦于以下问题:C# ProjectionNamesBuilder.GetPartitionCatalogStreamName方法的具体用法?C# ProjectionNamesBuilder.GetPartitionCatalogStreamName怎么用?C# ProjectionNamesBuilder.GetPartitionCatalogStreamName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EventStore.Projections.Core.Services.Processing.ProjectionNamesBuilder
的用法示例。
在下文中一共展示了ProjectionNamesBuilder.GetPartitionCatalogStreamName方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Build
public ProjectionSourceDefinition Build(ProjectionNamesBuilder namingBuilder)
{
return new ProjectionSourceDefinition
{
AllEvents = _allEvents,
AllStreams = _allStreams,
ByStream = _byStream,
ByCustomPartitions = _byCustomPartitions,
Categories = (_categories ?? new List<string>()).ToArray(),
Events = (_events ?? new List<string>()).ToArray(),
Streams = (_streams ?? new List<string>()).ToArray(),
DefinesStateTransform = _definesStateTransform,
Options = _options,
ResultStreamName = namingBuilder.GetResultStreamName(),
PartitionResultStreamNamePattern = namingBuilder.GetPartitionResultStreamNamePattern(),
PartitionResultCatalogStream = namingBuilder.GetPartitionResultCatalogStreamName(),
PartitionCatalogStream = namingBuilder.GetPartitionCatalogStreamName(),
};
}
示例2: CreateFirstPhaseResultWriter
protected virtual IResultWriter CreateFirstPhaseResultWriter(
IEmittedEventWriter emittedEventWriter, CheckpointTag zeroCheckpointTag,
ProjectionNamesBuilder namingBuilder)
{
return new ResultWriter(
CreateFirstPhaseResultEmitter(namingBuilder), emittedEventWriter, GetProducesRunningResults(),
zeroCheckpointTag, namingBuilder.GetPartitionCatalogStreamName());
}
示例3: CreateStateUpdatedEvents
private static List<EmittedEvent> CreateStateUpdatedEvents(ProjectionNamesBuilder projectionNamesBuilder, CheckpointTag zeroCheckpointTag, string partition, PartitionStateCache.State oldState, PartitionStateCache.State newState)
{
var result = new List<EmittedEvent>();
if (!String.IsNullOrEmpty(partition)
&& (oldState.CausedBy == null || oldState.CausedBy == zeroCheckpointTag))
{
result.Add(
new EmittedEvent(
projectionNamesBuilder.GetPartitionCatalogStreamName(), Guid.NewGuid(), "PartitionCreated", partition, newState.CausedBy,
null));
}
result.Add(
new EmittedEvent(
projectionNamesBuilder.MakePartitionStateStreamName(partition), Guid.NewGuid(), "StateUpdated", newState.Data,
newState.CausedBy, oldState.CausedBy));
return result;
}
示例4: From
public static ProjectionSourceDefinition From(
string name, IQuerySources sources, string handlerType, string query)
{
var namingBuilder = new ProjectionNamesBuilder(name, sources);
return new ProjectionSourceDefinition
{
AllEvents = sources.AllEvents,
AllStreams = sources.AllStreams,
ByStream = sources.ByStreams,
ByCustomPartitions = sources.ByCustomPartitions,
Categories = (sources.Categories ?? new string[0]).ToArray(),
Events = (sources.Events ?? new string[0]).ToArray(),
Streams = (sources.Streams ?? new string[0]).ToArray(),
CatalogStream = sources.CatalogStream,
LimitingCommitPosition = sources.LimitingCommitPosition,
Options =
new QuerySourceOptions
{
DefinesStateTransform = sources.DefinesStateTransform,
ProducesResults = sources.ProducesResults,
DefinesFold = sources.DefinesFold,
ForceProjectionName = sources.ForceProjectionNameOption,
IncludeLinks = sources.IncludeLinksOption,
PartitionResultStreamNamePattern = sources.PartitionResultStreamNamePatternOption,
ProcessingLag = sources.ProcessingLagOption.GetValueOrDefault(),
ReorderEvents = sources.ReorderEventsOption,
ResultStreamName = sources.ResultStreamNameOption,
},
ResultStreamName = namingBuilder.GetResultStreamName(),
PartitionResultStreamNamePattern = namingBuilder.GetPartitionResultStreamNamePattern(),
PartitionResultCatalogStream = namingBuilder.GetPartitionResultCatalogStreamName(),
PartitionCatalogStream = namingBuilder.GetPartitionCatalogStreamName(),
HandlerType = handlerType,
Query = query
};
}