private ISagaModel DoCreateModel(Type sagaType) { var handlerInspector = AnnotatedHandlerInspector.InspectType(sagaType, _parameterResolverFactory, _handlerDefinition); return(new InspectedSagaModel(handlerInspector.Handlers, this)); }
public AnnotatedAggregateModel(Type aggregateType, AnnotatedHandlerInspector handlerInspector, AnnotatedAggregateMetaModelFactory parent) { this._inspectedType = aggregateType; this._commandHandlerInterceptors = new List <IMessageHandlingMember>(); this._commandHandlers = new ConcurrentDictionary <string, IMessageHandlingMember>(); this._eventHandlers = new List <IMessageHandlingMember>(); this._children = new List <IChildEntity>(); this._handlerInspector = handlerInspector; _parent = parent; }
public AnnotationEventHandlerAdapter( object annotatedEventListener, IParameterResolverFactory parameterResolverFactory, IHandlerDefinition handlerDefinition ) { _annotatedEventListener = annotatedEventListener; _listenerType = annotatedEventListener.GetType(); _inspector = AnnotatedHandlerInspector <object> .InspectType(annotatedEventListener.GetType(), parameterResolverFactory, handlerDefinition); }
public AnnotatedAggregateModel CreateModel(Type aggregateType) { if (!_registry.ContainsKey(aggregateType)) { var inspector = AnnotatedHandlerInspector.InspectType(aggregateType, _parameterResolverFactory, _handlerDefinition); var model = new AnnotatedAggregateModel(aggregateType, inspector, this); model.Initialize(); _registry[aggregateType] = model; } return(_registry[aggregateType]); }