internal TIAssemblyIdentityRule(string name, ITIVersionRule version, ICultureIdentifier culture, byte[] publicKeyToken) { this.Name = name; this.Version = version; this.CultureIdentifier = culture; this.PublicKeyToken = publicKeyToken; }
public IntermediateProjectInformation(IIntermediateProject project, Action changeDelegate) { this.project = project; this.culture = CultureIdentifiers.None; this.fileVersion = new Version(1, 0); this.assemblyVersion = new Version(1, 0); this.title = this.project.Name; this.projectGuid = Guid.NewGuid(); this.changeDelegate = changeDelegate; }
public AssemblyInformation(Assembly assembly) { AttributeCollection attrC = new AttributeCollection(assembly.GetCustomAttributes(false).Cast <Attribute>().ToArray()); if (attrC[typeof(AssemblyTitleAttribute)] != null) { this.title = ((AssemblyTitleAttribute)attrC[typeof(AssemblyTitleAttribute)]).Title; } if (attrC[typeof(AssemblyCompanyAttribute)] != null) { this.company = ((AssemblyCompanyAttribute)attrC[typeof(AssemblyCompanyAttribute)]).Company; } if (attrC[typeof(AssemblyDescriptionAttribute)] != null) { this.description = ((AssemblyDescriptionAttribute)attrC[typeof(AssemblyDescriptionAttribute)]).Description; } if (attrC[typeof(AssemblyCopyrightAttribute)] != null) { this.copyright = ((AssemblyCopyrightAttribute)attrC[typeof(AssemblyCopyrightAttribute)]).Copyright; } if (attrC[typeof(AssemblyProductAttribute)] != null) { this.product = ((AssemblyProductAttribute)attrC[typeof(AssemblyProductAttribute)]).Product; } if (attrC[typeof(AssemblyTrademarkAttribute)] != null) { this.trademark = ((AssemblyTrademarkAttribute)attrC[typeof(AssemblyTrademarkAttribute)]).Trademark; } if (attrC[typeof(AssemblyFileVersionAttribute)] != null) { this.fileVersion = new Version(((AssemblyFileVersionAttribute)attrC[typeof(AssemblyFileVersionAttribute)]).Version); } this.assemblyVersion = assembly.GetName().Version; this.culture = CultureIdentifiers.GetIdentifierById(assembly.GetName().CultureInfo.LCID); /* * if (attrC[typeof(NeutralResourcesLanguageAttribute)] != null) * this.culture = CultureIdentifier.defaultCultureIDByCultureName[((NeutralResourcesLanguageAttribute)attrC[typeof(NeutralResourcesLanguageAttribute)]).CultureName]; * //*/ this.path = assembly.Location; this.strongName = attrC[typeof(AssemblyKeyFileAttribute)] != null; this.loadedFromGac = assembly.GlobalAssemblyCache; this.assemblyName = assembly.GetName().Name; }
public void Dispose() { try { this.owner = null; if (this.fileVersion != null) { this.fileVersion = null; } if (this.assemblyVersion != null) { this.assemblyVersion = null; } if (this.cultureIdentifier != null) { this.cultureIdentifier = null; } } finally { GC.SuppressFinalize(this); } }
public static IAssemblyUniqueIdentifier GetAssemblyIdentifier(string name, Version assemblyVersion, ICultureIdentifier culture, byte[] publicKey = null) { if (publicKey != null && publicKey.Length == 0) { publicKey = null; } if (publicKey != null && publicKey.Length != 8) { throw new ArgumentOutOfRangeException("publicKey"); } return(new DefaultAssemblyUniqueIdentifier(name, new _Version(assemblyVersion), culture, publicKey == null ? null : publicKey.Length == 0 ? null : publicKey)); }
public static IAssemblyUniqueIdentifier GetAssemblyIdentifier(string name, Version assemblyVersion, ICultureIdentifier culture, string languageSpecificQualifier, byte[] publicKey = null) { var result = GetAssemblyIdentifier(name, assemblyVersion, culture, publicKey); ((DefaultAssemblyUniqueIdentifier)result).LanguageSpecificQualifier = languageSpecificQualifier; return(result); }