Table of Contents

Class AssemblyExtensions

Namespace
Cuemon.Extensions.Reflection
Assembly
Cuemon.Extensions.Reflection.dll

Extension methods for the System.Reflection.Assembly class.

public static class AssemblyExtensions
Inheritance
Object
AssemblyExtensions

Methods

GetAssemblyVersion(Assembly)

Returns a VersionResult that represents the version number of the specified assembly.

public static VersionResult GetAssemblyVersion(this Assembly assembly)

Parameters

assembly Assembly

The assembly to resolve a System.Version from.

Returns

VersionResult

A VersionResult that represents the version number of the specified assembly.

GetFileVersion(Assembly)

Returns a VersionResult that represents the file version number of the specified assembly.

public static VersionResult GetFileVersion(this Assembly assembly)

Parameters

assembly Assembly

The assembly to resolve a System.Version from.

Returns

VersionResult

A VersionResult that represents the file version number of the specified assembly.

Exceptions

System.ArgumentNullException

assembly is null.

GetProductVersion(Assembly)

Returns a VersionResult that represents the version of the product this assembly is distributed with.

public static VersionResult GetProductVersion(this Assembly assembly)

Parameters

assembly Assembly

The assembly to resolve a System.Version from.

Returns

VersionResult

A VersionResult that represents the version of the product this assembly is distributed with.

Exceptions

System.ArgumentNullException

assembly is null.

IsDebugBuild(Assembly)

Determines whether the specified assembly is a debug build.

public static bool IsDebugBuild(this Assembly assembly)

Parameters

assembly Assembly

The assembly to parse and determine whether it is a debug build or not.

Returns

Boolean

true if the specified assembly is a debug build; otherwise, false.