本文整理汇总了C#中IEvent.EventStreamName方法的典型用法代码示例。如果您正苦于以下问题:C# IEvent.EventStreamName方法的具体用法?C# IEvent.EventStreamName怎么用?C# IEvent.EventStreamName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IEvent
的用法示例。
在下文中一共展示了IEvent.EventStreamName方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TraceEvent
private static void TraceEvent(IEvent e)
{
Trace.WriteLine(string.Format("{0}.{1}",
e.EventStreamName(),
e.EventName()));
Trace.WriteLine(
e.ToJson(Formatting.Indented)
.Split('\n')
.Select(line => " " + line)
.ToDelimitedString("\n"));
}
示例2: EventHandlingError
public EventHandlingError(
Exception exception,
object handler = null,
IEvent @event = null)
{
Exception = exception;
exception.Data["ActivityId"] = Trace.CorrelationManager.ActivityId;
Handler = handler.InnerHandler();
Event = @event;
if (@event != null)
{
AggregateId = @event.AggregateId;
SequenceNumber = @event.SequenceNumber;
StreamName = @event.EventStreamName();
}
}
示例3: Matches
public bool Matches(IEvent @event)
{
return (streamName == "" || streamName == Wildcard || streamName.Equals(@event.EventStreamName())) &&
(type == "" || type == Wildcard || type.Equals(@event.EventName()));
}
示例4: CreateEventHandlingError
private static EventHandlingError CreateEventHandlingError(IEvent e) =>
new EventHandlingError
{
Actor = e.Actor(),
AggregateId = e.AggregateId,
SequenceNumber = e.SequenceNumber,
SerializedEvent = e.ToJson(),
StreamName = e.EventStreamName(),
EventTypeName = e.EventName(),
OriginalId = null
};