Table of Contents

Class AssemblyAttributes

Namespace
Acuit.Pinpoint.Common
Assembly
Acuit.Pinpoint.Common.dll

A helper class for accessing assembly attributes for an assembly.

public class AssemblyAttributes
Inheritance
AssemblyAttributes
Inherited Members

Constructors

AssemblyAttributes(Assembly)

Initializes a new instance of the AssemblyAttributes class.

public AssemblyAttributes(Assembly assembly)

Parameters

assembly Assembly

The assembly from which to access attributes.

Properties

Gets the Copyright value from the AssemblyCopyrightAttribute, or null if the attribute does not exist.

public string? Copyright { get; }

Property Value

string

CopyrightForConsole

Gets the Copyright value from the AssemblyCopyrightAttribute, formatted for display to the console (copyright symbols changed to "(c)"), or null if the attribute does not exist.

public string? CopyrightForConsole { get; }

Property Value

string

Description

Gets the Description value from the AssemblyDescriptionAttribute, or null if the attribute does not exist.

public string? Description { get; }

Property Value

string

Entry

Gets the helper for accessing the entry assembly attributes.

public static AssemblyAttributes Entry { get; }

Property Value

AssemblyAttributes

FileVersion

Gets the Version value from the AssemblyFileVersionAttribute, or null if the attribute does not exist.

public string? FileVersion { get; }

Property Value

string

InformationalVersion

Gets the InformationalVersion value from the AssemblyInformationalVersionAttribute, or null if the attribute does not exist.

public string? InformationalVersion { get; }

Property Value

string

VersionForDisplay

Gets a version for display.

public string VersionForDisplay { get; }

Property Value

string

Remarks

The version will be the first non-white-space value found from the following possibilities:

  1. The AssemblyInformationalVersionAttribute value, adjusted as follows:
    • If the value appears to be suffixed with build metadata, the build metadata will be removed. This will remove Source Link information that can be automatically added by the .NET SDK. A suffix consisting of a plus sign ("+") followed by one or more dot-separated identifiers, where each identifier consists of one or more alphanumeric digits (case-insensitive) or hyphens, will be interpreted as build metadata. For example, "1.2.3-preview.4+283b49f11d" will be adjusted to be "1.2.3-preview.4".
  2. The AssemblyFileVersionAttribute value.
  3. The version from the assembly's long name.
  4. The "?" string.

Methods

Executing()

Gets the helper for accessing the executing assembly attributes.

public static AssemblyAttributes Executing()

Returns

AssemblyAttributes

The helper for accessing the executing assembly attributes.