Beispiel #1
0
 public bool EnsureTypeReferenced(ProjectContext projectContext)
 {
     if (this.onDemandAssemblyFileName != null)
     {
         foreach (AssemblyNameAndLocation assemblyNameAndLocation in this.resolvableAssemblyReferences)
         {
             if (projectContext.GetAssembly(assemblyNameAndLocation.AssemblyName) == null)
             {
                 projectContext.EnsureAssemblyReferenced(assemblyNameAndLocation.Location);
             }
         }
         if (!projectContext.EnsureAssemblyReferenced(this.onDemandAssemblyFileName))
         {
             return(false);
         }
         IType type = projectContext.GetType(this.type.RuntimeAssembly.Name, this.type.FullName);
         if (type == null)
         {
             return(false);
         }
         this.type = type;
     }
     return(true);
 }