// // 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; }
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); }
FlowContext( Flow flow, FlowKey key, TimelinePosition checkpointPosition, TimelinePosition errorPosition) : this(flow, key) { CheckpointPosition = checkpointPosition; ErrorPosition = errorPosition; }
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; }
FlowContext(Flow flow, FlowKey key) { _flow = flow; Key = key; IsNew = true; }
FlowContext(Flow flow, FlowKey key) { _flow = flow; Key = key; }