Click or drag to resize
AssemblyExtension Class

Extends the System.Reflection.Assembly class.

The methods in this class return information available in the assembly manifest.

Inheritance Hierarchy
SystemObject
  NosnitorAssemblyExtension

Namespace:  Nosnitor
Assembly:  Nosnitor.Common (in Nosnitor.Common.dll) Version: 2.0.1-alpha.869
Syntax
public static class AssemblyExtension
Methods
  NameDescription
Public methodStatic memberCode exampleGetAssemblyCompany
Returns the AssemblyCompanyAttribute for the assembly calling this function.
Public methodStatic memberCode exampleGetAssemblyCompany(Assembly)
Returns the AssemblyCompanyAttribute for the passed assembly.
Public methodStatic memberCode exampleGetAssemblyConfiguration
Returns the AssemblyConfigurationAttribute for the assembly calling this function.
Public methodStatic memberCode exampleGetAssemblyConfiguration(Assembly)
Returns the AssemblyConfigurationAttribute for the passed assembly.
Public methodStatic memberCode exampleGetAssemblyCopyright
Returns the AssemblyCopyrightAttribute for the assembly calling this function.
Public methodStatic memberCode exampleGetAssemblyCopyright(Assembly)
Returns the AssemblyCopyrightAttribute for the passed assembly.
Public methodStatic memberCode exampleGetAssemblyDefaultAlias
Returns the AssemblyDefaultAliasAttribute for the assembly calling this function.
Public methodStatic memberCode exampleGetAssemblyDefaultAlias(Assembly)
Returns the AssemblyDefaultAliasAttribute for the passed assembly.
Public methodStatic memberCode exampleGetAssemblyDescription
Returns the AssemblyDescriptionAttribute for the assembly calling this function.
Public methodStatic memberCode exampleGetAssemblyDescription(Assembly)
Returns the AssemblyDescriptionAttribute for the passed assembly.
Public methodStatic memberCode exampleGetAssemblyFileVersion
Returns the AssemblyFileVersionAttribute for the assembly calling this function.
Public methodStatic memberCode exampleGetAssemblyFileVersion(Assembly)
Returns the AssemblyFileVersionAttribute for the passed assembly.
Public methodStatic memberCode exampleGetAssemblyInformationalVersion
Returns the AssemblyInformationalVersionAttribute for the assembly calling this function.
Public methodStatic memberCode exampleGetAssemblyInformationalVersion(Assembly)
Returns the AssemblyInformationalVersionAttribute for the passed assembly.
Public methodStatic memberCode exampleGetAssemblyProduct
Returns the AssemblyProductAttribute for the assembly calling this function.
Public methodStatic memberCode exampleGetAssemblyProduct(Assembly)
Returns the AssemblyProductAttribute for the passed assembly.
Public methodStatic memberCode exampleGetAssemblyTitle
Returns the AssemblyTitleAttribute for the assembly calling this function.
Public methodStatic memberCode exampleGetAssemblyTitle(Assembly)
Returns the AssemblyTitleAttribute for the passed assembly.
Public methodStatic memberCode exampleGetAssemblyTrademark
Returns the AssemblyTrademarkAttribute for the assembly calling this function.
Public methodStatic memberCode exampleGetAssemblyTrademark(Assembly)
Returns the AssemblyTrademarkAttribute for the passed assembly.
Public methodStatic memberCode exampleGetAssemblyVersion
Returns the AssemblyVersionAttribute for the assembly calling this function.
Public methodStatic memberCode exampleGetAssemblyVersion(Assembly)
Returns the AssemblyVersionAttribute for the passed assembly.
Top
Examples
Showing values of the calling assembly:
// Assembly Identity Attributes
string version = AssemblyExtension.GetAssemblyVersion();

// Assembly Informational Attributes
string company = AssemblyExtension.GetAssemblyCompany();
string copyright = AssemblyExtension.GetAssemblyCopyright();
string fileVersion = AssemblyExtension.GetAssemblyFileVersion();
string informationalVersion = AssemblyExtension.GetAssemblyInformationalVersion();
string product = AssemblyExtension.GetAssemblyInformationalVersion();
string trademark = AssemblyExtension.GetAssemblyTrademark();

// Assembly Manifest Attributes
string configuration = AssemblyExtension.GetAssemblyConfiguration();
string defaultAlias = AssemblyExtension.GetAssemblyDefaultAlias();
string description = AssemblyExtension.GetAssemblyDescription();
string title = AssemblyExtension.GetAssemblyTitle();
Showing values of a passed assembly:
string assemblyPath = Directory.GetCurrentDirectory() + @"\" + "TestAttributeAssembly1.dll";
Assembly assembly = Assembly.LoadFile(assemblyPath);

Debug.Write("Copyright: " + AssemblyExtension.GetAssemblyCopyright(assembly));
Debug.Write("Title: " + AssemblyExtension.GetAssemblyTitle(assembly));
See Also