using System.Collections.Generic; namespace Unity.Services.Core { /// /// Contain dependency relations between /// types and types using their hash code. /// class DependencyTree { /// /// Key: Hash code of a type. /// Value: Package instance. /// public Dictionary PackageTypeHashToInstance; /// /// Key: Hash code of a type. /// Value: Hash code of the type providing the component type. /// public Dictionary ComponentTypeHashToPackageTypeHash; /// /// Key: Hash code of the type. /// Value: Container of all hash code of /// types required to initialize the package. /// public Dictionary> PackageTypeHashToComponentTypeHashDependencies; /// public readonly Dictionary ComponentTypeHashToInstance; internal DependencyTree() : this( new Dictionary(), new Dictionary(), new Dictionary>(), new Dictionary()) {} internal DependencyTree( Dictionary packageToInstance, Dictionary componentToPackage, Dictionary> packageToComponentDependencies, Dictionary componentToInstance) { PackageTypeHashToInstance = packageToInstance; ComponentTypeHashToPackageTypeHash = componentToPackage; PackageTypeHashToComponentTypeHashDependencies = packageToComponentDependencies; ComponentTypeHashToInstance = componentToInstance; } } }