Example #1
0
 /// <summary>
 /// Merges the specified dependency set into this instance, adding all
 /// its contained types.
 /// </summary>
 /// <param name="dependencySet">The dependency set to merge.</param>
 public void MergeDependents(IGraphItemDependencies dependencySet)
 {
     if (dependencySet?.DependentTypes != null)
     {
         this.AddDependentRange(dependencySet.DependentTypes);
     }
     if (dependencySet?.AbstractGraphTypes != null)
     {
         this.AddDependentRange(dependencySet.AbstractGraphTypes);
     }
 }
Example #2
0
        /// <summary>
        /// Ensures the dependents.
        /// </summary>
        /// <param name="dependencySet">The dependency set.</param>
        private void EnsureDependents(IGraphItemDependencies dependencySet)
        {
            foreach (var abstractType in dependencySet.AbstractGraphTypes)
            {
                this.Schema.KnownTypes.EnsureGraphType(abstractType);
            }

            foreach (var dependent in dependencySet.DependentTypes)
            {
                this.EnsureGraphType(dependent.Type, dependent.ExpectedKind);
            }
        }