Merging Multiple Metadata Sources
The AggregateMetadataSource can be used to merge multiple MetadataContainers and produce a new MetadataContainer that contains the combined metadata. The AggregateMetadataSource class uses a special algorithm internally to resolve references when merging objects. Suppose you have a class A and a class B, which classes you want to merge. Class A has a reference to class C. In this case, when you merge class A and class B, the AggregateMetadataSource class cannot resolve the reference from A to C out of the box. Reference resolution can be controlled by specifying AggregationOptions in the AggregateMetadataSource.
For more information, please refer to the following topics: