Microsoft.Cci.MetadataHostEnvironment.LoadUnit C# (CSharp) Method

LoadUnit() public method

The unit that matches the given identity, or a dummy unit if no matching unit can be found.
public LoadUnit ( Microsoft.Cci.UnitIdentity unitIdentity ) : IUnit
unitIdentity Microsoft.Cci.UnitIdentity
return IUnit
    public IUnit LoadUnit(UnitIdentity unitIdentity) {
      AssemblyIdentity/*?*/ assemblyIdentity = unitIdentity as AssemblyIdentity;
      if (assemblyIdentity != null) return this.LoadAssembly(assemblyIdentity);
      ModuleIdentity/*?*/ moduleIdentity = unitIdentity as ModuleIdentity;
      if (moduleIdentity != null) return this.LoadModule(moduleIdentity);
      return this.LoadUnitFrom(unitIdentity.Location);
    }