Beispiel #1
0
        private void AddAssemblyReference(ProjectAssembly projectAssembly)
        {
            Assembly assembly = projectAssembly.ReferenceAssembly ?? projectAssembly.RuntimeAssembly;

            if (!(assembly != (Assembly)null))
            {
                return;
            }
            try
            {
                if (assembly != (Assembly)null)
                {
                    this.projectResolver.AddExternalReference(assembly);
                    if (CodeProject.HasProjectAssemblyChangedLocation(projectAssembly.FullName, assembly))
                    {
                        this.asyncManager.RefreshAssembly(projectAssembly);
                    }
                }
            }
            catch (ApplicationException ex)
            {
                return;
            }
            this.activeReferences.Add(projectAssembly);
            if (!(assembly != (Assembly)null) || assembly.IsDynamic)
            {
                return;
            }
            CodeProject.assemblyToLocationMap[projectAssembly.FullName] = assembly.Location;
        }
Beispiel #2
0
 public void ActivateEditing(DocumentReference documentReference)
 {
     if (!this.isInitialized)
     {
         this.Initialize();
     }
     else
     {
         this.asyncManager.Resume();
     }
     foreach (ProjectAssembly assembly1 in this.activeReferences)
     {
         Assembly assembly2 = assembly1.ReferenceAssembly ?? assembly1.RuntimeAssembly;
         if (assembly2 != (Assembly)null && CodeProject.HasProjectAssemblyChangedLocation(assembly1.FullName, assembly2))
         {
             this.asyncManager.RefreshAssembly(assembly1);
         }
     }
     this.PerformPartialCompileIfNecessary(documentReference);
 }