Microsoft.Cci.MetadataReaderHost.ResolvingAssemblyReference C# (CSharp) Method

ResolvingAssemblyReference() public method

This method is called when the assembly reference is being resolved and its not already loaded by the Read/Write host.
public ResolvingAssemblyReference ( IUnit referringUnit, Microsoft.Cci.AssemblyIdentity referencedAssembly ) : void
referringUnit IUnit The unit that is referencing the assembly.
referencedAssembly Microsoft.Cci.AssemblyIdentity Assembly identity for the assembly being referenced.
return void
    public virtual void ResolvingAssemblyReference(IUnit referringUnit, AssemblyIdentity referencedAssembly) {
      if (!string.IsNullOrEmpty(referencedAssembly.Location)) {
        this.LoadUnit(referencedAssembly);
      } else {
        AssemblyIdentity ai = this.ProbeAssemblyReference(referringUnit, referencedAssembly);
        if (ai != null && !String.IsNullOrEmpty(ai.Location)) {
          this.LoadUnit(ai);
        }
      }
    }