Esempio n. 1
0
        public bool Equals(AssemblyDescriptor obj, VersionToleranceLevel versionToleranceLevel)
        {
            if (versionToleranceLevel.HasFlag(VersionToleranceLevel.AllowAssemblyVersionChange))
            {
                return(obj.Name == Name && obj.CultureName == CultureName && obj.Token.SequenceEqual(Token));
            }

            return(Equals(obj));
        }
Esempio n. 2
0
        public static AssemblyDescriptor ReadFromStream(ObjectReader reader)
        {
            var descriptor = new AssemblyDescriptor();

            descriptor.ReadAssemblyStamp(reader);
            var assemblyName = new AssemblyName(descriptor.FullName);

            descriptor.UnderlyingAssembly = Assembly.Load(assemblyName);
            return(descriptor);
        }
 public ModuleDescriptor(Module module)
 {
     ModuleAssembly = new AssemblyDescriptor(module.Assembly);
     Name           = module.Name;
     GUID           = module.ModuleVersionId;
 }
        public bool Equals(AssemblyDescriptor obj, VersionToleranceLevel versionToleranceLevel)
        {
            if(versionToleranceLevel.HasFlag(VersionToleranceLevel.AllowAssemblyVersionChange))
            {
                return obj.Name == Name && obj.CultureName == CultureName && obj.Token.SequenceEqual(Token);
            }

            return Equals(obj);
        }
 public ModuleDescriptor(Module module)
 {
     ModuleAssembly = new AssemblyDescriptor(module.Assembly);
     Name = module.Name;
     GUID = module.ModuleVersionId;
 }
Esempio n. 6
0
 internal int TouchAndWriteAssemblyId(AssemblyDescriptor assembly)
 {
     int assemblyId;
     if(assemblyIndices.ContainsKey(assembly))
     {
         assemblyId = assemblyIndices[assembly];
         writer.Write(assemblyId);
         return assemblyId;
     }
     assemblyId = nextAssemblyId++;
     assemblyIndices.Add(assembly, assemblyId);
     writer.Write(assemblyId);
     assembly.WriteTo(this);
     return assemblyId;
 }