C# 클래스 Ncqrs.Eventing.Sourcing.Mapping.AttributeBasedDomainSourcedEventHandlerMappingStrategy

An internal event handler mapping strategy that creates event handlers based on mapping that is done by attributes. Use the EventHandlerAttribute to mark event handler methods as an event handler. You can only mark methods that following rules: The method should be an instance method (no static). It should accept 1 parameter. The parameter should be, or inherited from, the SourcedEvent class. The method should be marked with the EventHandlerAttribute. public class Foo : AggregateRootMappedWithAttributes { [EventHandler] private void onFooEvent(FooEvent eventToHandle) { // ... } }
상속: ISourcedEventHandlerMappingStrategy
파일 보기 프로젝트 열기: SzymonPobiega/ncqrs 1 사용 예제들

공개 메소드들

메소드 설명
GetEventHandlersFromAggregateRoot ( IEventSource eventSource ) : IEnumerable

Gets the event handlers from aggregate root based on attributes.

비공개 메소드들

메소드 설명
CreateHandlerForMethod ( IEventSource eventSource, MethodInfo method, Ncqrs.Eventing.Sourcing.Mapping.EventHandlerAttribute attribute ) : ISourcedEventHandler
FirstParameterType ( MethodInfo target ) : Type
IsMarkedAsEventHandler ( MethodInfo target, Ncqrs.Eventing.Sourcing.Mapping.EventHandlerAttribute &attribute ) : System.Boolean
NumberOfParameters ( MethodInfo target ) : int

메소드 상세

GetEventHandlersFromAggregateRoot() 공개 메소드

Gets the event handlers from aggregate root based on attributes.
public GetEventHandlersFromAggregateRoot ( IEventSource eventSource ) : IEnumerable
eventSource IEventSource The aggregate root.
리턴 IEnumerable