示例#1
0
 internal FlowObservation(FlowType flowType, EventType eventType, FlowRoute route, FlowMethodSet <FlowGiven> given)
 {
     FlowType  = flowType;
     EventType = eventType;
     Route     = route;
     Given     = given;
 }
示例#2
0
 internal TopicObservation(
     FlowType flowType,
     EventType eventType,
     FlowRoute route,
     FlowMethodSet <FlowGiven> given,
     FlowMethodSet <TopicWhen> when)
     : base(flowType, eventType, route, given)
 {
     When = when;
 }
示例#3
0
        internal FlowRoute(MethodInfo info, EventType eventType, FlowType flowType, bool first) : base(info, eventType)
        {
            FlowType = flowType;
            First    = first;

            if (info.ReturnType == typeof(Id))
            {
                _callSingle = new Lazy <Func <Event, Id> >(CompileCallSingle);
            }
            else
            {
                _callMultiple = new Lazy <Func <Event, IEnumerable <Id> > >(CompileCallMultiple);
            }
        }
示例#4
0
        public bool TryGetFlow(AreaTypeName name, out FlowType type)
        {
            if (Topics.TryGet(name, out var topic))
            {
                type = topic;
            }
            else if (Queries.TryGet(name, out var query))
            {
                type = query;
            }
            else
            {
                type = null;
            }

            return(type != null);
        }