private bool DoesLifetimeOutlastLifetimeGraph(BoundedLifetime boundedLifetime, LifetimeGraphIdentifier graphIdentifier) { BoundedLifetimeGraph boundedLifetimeGraph = boundedLifetime.DiagramGraph; BoundedLifetimeGraph diagramGraph = _diagramGraphs[graphIdentifier]; if (boundedLifetimeGraph == diagramGraph) { return(boundedLifetimeGraph.DoesOutlast(boundedLifetime, boundedLifetimeGraph.DiagramLifetime)); } else { LifetimeGraphIdentifier currentGraphIdentifier = graphIdentifier, parentGraphIdentifier; while (_graphParents.TryGetValue(currentGraphIdentifier, out parentGraphIdentifier)) { diagramGraph = _diagramGraphs[currentGraphIdentifier]; if (diagramGraph == boundedLifetimeGraph) { return(true); } currentGraphIdentifier = parentGraphIdentifier; } return(false); } }
public override bool DoesOutlastLifetimeGraph(LifetimeGraphIdentifier lifetimeGraphIdentifier) => _graphTree.DoesLifetimeOutlastLifetimeGraph(this, lifetimeGraphIdentifier);
public Lifetime CreateLifetimeThatIsBoundedByLifetimeGraph(LifetimeGraphIdentifier graphIdentifier) { return(_diagramGraphs[graphIdentifier].CreateLifetimeThatIsBoundedByDiagram()); }
public Lifetime GetLifetimeGraphRootLifetime(LifetimeGraphIdentifier graphIdentifier) { return(_diagramGraphs[graphIdentifier].DiagramLifetime); }
public void EstablishLifetimeGraph(LifetimeGraphIdentifier identifier, LifetimeGraphIdentifier parentIdentifier) { _diagramGraphs[identifier] = new BoundedLifetimeGraph(this); _graphParents[identifier] = parentIdentifier; }
public abstract bool DoesOutlastLifetimeGraph(LifetimeGraphIdentifier lifetimeGraphIdentifier);
public override bool DoesOutlastLifetimeGraph(LifetimeGraphIdentifier lifetimeGraphIdentifier) => !_isEmpty;
public OutlastsLifetimeGraphConstraint(LifetimeGraphIdentifier lifetimeGraph) { _lifetimeGraph = lifetimeGraph; }