Esempio n. 1
0
        //
        // Bind
        //

        public static void Bind(Flow flow, FlowKey key)
        {
            Expect.That(flow.Context).IsNull("The flow is already bound to a context");

            flow.Context = new FlowContext(flow, key);
            flow.Id      = key.Id;
        }
Esempio n. 2
0
        public TimelinePoint(
            TimelinePosition position,
            TimelinePosition cause,
            EventType type,
            DateTimeOffset when,
            DateTimeOffset?whenOccurs,
            Id eventId,
            Id commandId,
            Id userId,
            FlowKey topic,
            Many <FlowKey> routes,
            Func <Event> readEvent)
        {
            Position   = position;
            Cause      = cause;
            Type       = type;
            When       = when;
            WhenOccurs = whenOccurs;
            EventId    = eventId;
            CommandId  = commandId;
            UserId     = userId;
            Topic      = topic;
            Routes     = routes;

            _event = new Lazy <Event>(readEvent);
        }
Esempio n. 3
0
 FlowContext(
     Flow flow,
     FlowKey key,
     TimelinePosition checkpointPosition,
     TimelinePosition errorPosition)
     : this(flow, key)
 {
     CheckpointPosition = checkpointPosition;
     ErrorPosition      = errorPosition;
 }
Esempio n. 4
0
        public static void Bind(
            Flow flow,
            FlowKey key,
            TimelinePosition checkpointPosition,
            TimelinePosition errorPosition)
        {
            Expect.That(flow.Context).IsNull("The flow is already bound to a context");

            flow.Context = new FlowContext(flow, key, checkpointPosition, errorPosition);
            flow.Id      = key.Id;
        }
Esempio n. 5
0
 FlowContext(Flow flow, FlowKey key)
 {
     _flow = flow;
     Key   = key;
     IsNew = true;
 }
Esempio n. 6
0
 FlowContext(Flow flow, FlowKey key)
 {
     _flow = flow;
     Key   = key;
 }