Пример #1
0
        // ******************************************************************
        private void AddReferencedAssemblyFor(AssemblyDetails assemblyDetailsReferer, AssemblyName assemblyName)
        {
            var existingReferencedAsm = ReferencedAssemblies.FirstOrDefault(refAsm => refAsm.UniqueName == ReferencedAssembly.GetUniqueNameFromAssemblyName(assemblyName));

            if (existingReferencedAsm == null)
            {
                existingReferencedAsm = new ReferencedAssembly(assemblyName);

                object o1 = assemblyName.ProcessorArchitecture;
                object o2 = assemblyName.Flags;

                //string asmPath = Path.Combine(DirectoryPath, assemblyName.Name + ".dll");
                //if (File.Exists(asmPath))
                //{
                //	Assembly asm = Assembly.ReflectionOnlyLoadFrom(asmPath);
                //}

                this.ReferencedAssemblies.Add(existingReferencedAsm);
            }

            existingReferencedAsm.Referers.Add(assemblyDetailsReferer);
        }
Пример #2
0
        // ******************************************************************
        private void AddReferencedAssemblyFor(AssemblyDetails assemblyDetailsReferer, AssemblyName assemblyName)
        {
            var existingReferencedAsm = ReferencedAssemblies.FirstOrDefault(refAsm => refAsm.UniqueName == ReferencedAssembly.GetUniqueNameFromAssemblyName(assemblyName));
            if (existingReferencedAsm == null)
            {
                existingReferencedAsm = new ReferencedAssembly(assemblyName);

                object o1 = assemblyName.ProcessorArchitecture;
                object o2= assemblyName.Flags;

                //string asmPath = Path.Combine(DirectoryPath, assemblyName.Name + ".dll");
                //if (File.Exists(asmPath))
                //{
                //	Assembly asm = Assembly.ReflectionOnlyLoadFrom(asmPath);
                //}

                this.ReferencedAssemblies.Add(existingReferencedAsm);
            }

            existingReferencedAsm.Referers.Add(assemblyDetailsReferer);
        }