Exemplo n.º 1
0
        public override bool Equals(object obj)
        {
            if (this == obj)
            {
                return(true);
            }
            ProjectAssembly projectAssembly = obj as ProjectAssembly;

            if (projectAssembly == null)
            {
                return(false);
            }
            return(projectAssembly.FullName == this.FullName);
        }
Exemplo n.º 2
0
        private void UpdateGlobalAssemblyCacheProperty()
        {
            MSBuildBasedProject project = base.Project as MSBuildBasedProject;
            bool flag = false;

            if (project != null)
            {
                ProjectAssembly referencedAssembly = project.GetReferencedAssembly(this);
                if (referencedAssembly != null)
                {
                    flag = (referencedAssembly.RuntimeAssembly != null ? referencedAssembly.RuntimeAssembly.GlobalAssemblyCache : false);
                }
            }
            this.globalAssemblyCache = flag;
        }
        internal void UpdateReferenceAssembly(ProjectAssembly projectAssembly)
        {
            if (projectAssembly.IsPlatformAssembly && projectAssembly.ReferenceAssembly == null)
            {
                Assembly runtimeAssembly = projectAssembly.RuntimeAssembly;
                if (runtimeAssembly != null)
                {
                    Assembly assembly = null;
                    if (!this.referenceAssemblyTable.TryGetValue(runtimeAssembly, out assembly) || assembly == null)
                    {
                        string empty = string.Empty;
                        switch (this.referenceAssemblyMode)
                        {
                        case Microsoft.Expression.Project.ReferenceAssemblyMode.TargetFramework:
                        {
                            empty = this.ResolveReferenceAssemblyPath(projectAssembly.Name);
                            break;
                        }

                        case Microsoft.Expression.Project.ReferenceAssemblyMode.Project:
                        {
                            empty = projectAssembly.Path;
                            break;
                        }
                        }
                        if (!string.IsNullOrEmpty(empty))
                        {
                            assembly = this.defaultUniverse.LoadAssemblyFromFile(empty);
                            if (assembly != null)
                            {
                                this.referenceAssemblyTable[runtimeAssembly] = assembly;
                            }
                        }
                    }
                    projectAssembly.ReferenceAssembly = assembly;
                }
            }
        }