Ejemplo n.º 1
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.º 2
0
 FlowContext(
     Flow flow,
     FlowKey key,
     TimelinePosition checkpointPosition,
     TimelinePosition errorPosition)
     : this(flow, key)
 {
     CheckpointPosition = checkpointPosition;
     ErrorPosition      = errorPosition;
 }
Ejemplo n.º 3
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.º 4
0
 internal void SetError(TimelinePosition position, string message)
 {
     ErrorPosition = position;
     ErrorMessage  = message;
 }