/// <summary> /// Asks the passed in item and all its children to resolve references to other /// EFElements across the entire model, i.e., a ScalarProperty will link up to its /// entity and storage properties. /// </summary> internal void ResolveItem(EFContainer item) { lock (this) { var visitor = new ResolvingVisitor(item.Artifact.ArtifactSet); var lastMissedCount = visitor.MissedCount; while (visitor.MissedCount != 0) { visitor.ResetMissedCount(); visitor.Traverse(item); // if we can't resolve any more then we are done if (lastMissedCount == visitor.MissedCount) { break; } lastMissedCount = visitor.MissedCount; } } }
/// <summary> /// Asks every EFElement in the given EFArtifactSet to resolve references to other EFElements in the EFArtifactSet, /// i.e., a ScalarProperty will link up to its entity and storage properties. /// </summary> private void ResolveArtifactSet(EFArtifactSet artifactSet) { lock (this) { var visitor = new ResolvingVisitor(artifactSet); var lastMissedCount = visitor.MissedCount; while (visitor.MissedCount != 0) { visitor.ResetMissedCount(); foreach (var artifact in artifactSet.Artifacts) { visitor.Traverse(artifact); } // if we can't resolve any more then we are done if (lastMissedCount == visitor.MissedCount) { break; } lastMissedCount = visitor.MissedCount; } } }