Ejemplo 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;
        }
Ejemplo 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);
        }
Ejemplo n.º 3
0
 FlowContext(
     Flow flow,
     FlowKey key,
     TimelinePosition checkpointPosition,
     TimelinePosition errorPosition)
     : this(flow, key)
 {
     CheckpointPosition = checkpointPosition;
     ErrorPosition      = errorPosition;
 }
Ejemplo 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;
        }
Ejemplo n.º 5
0
 FlowContext(Flow flow, FlowKey key)
 {
     _flow = flow;
     Key   = key;
     IsNew = true;
 }
Ejemplo n.º 6
0
 FlowContext(Flow flow, FlowKey key)
 {
     _flow = flow;
     Key   = key;
 }