public FlowScope(ILifetimeScope lifetime, IFlowDb db, FlowType type, TimelineRoute route) { _lifetime = lifetime; _db = db; _type = type; _route = route; Key = type.CreateKey(route.Id); }
internal bool TryRoute() { var route = _route; _route = null; return(_db.TryReadFlow(_type, route, out _flow)); }
public bool TryOpenFlowScope(FlowType type, TimelineRoute route, out IFlowScope scope) { var unroutedScope = new FlowScope(_lifetime, _flowDb, type, route); scope = unroutedScope.TryRoute() ? unroutedScope : null; return(scope != null); }
private bool TryOpenScope(TimelineRoute route, out IFlowScope scope) { scope = null; if (_timeline.TryOpenFlowScope(_flow, route, out scope)) { var connection = scope.Connect(this); _scopesById[route.Id] = scope; RemoveWhenDone(scope, connection); } return(scope != null); }
private bool TryGetScope(TimelineRoute route, out IFlowScope scope) { return(_scopesById.TryGetValue(route.Id, out scope)); }