Show / Hide Table of Contents

Class AssemblyExtensions

A static class that contains extension methods for the System.Reflection.Assembly class.

Inheritance
System.Object
AssemblyExtensions
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Juhta.Net.Extensions
Assembly: Juhta.Net.dll
Syntax
public static class AssemblyExtensions

Methods

| Improve this Doc View Source

GetCompany(Assembly)

Gets the value of the current assembly's Company attribute.

Declaration
public static string GetCompany(this Assembly assembly)
Parameters
Type Name Description
System.Reflection.Assembly assembly

Specifies the current assembly.

Returns
Type Description
System.String

Returns the value of the Company attribute, or null, if the attibute was not found.

| Improve this Doc View Source

GetCopyright(Assembly)

Gets the value of the current assembly's Copyright attribute.

Declaration
public static string GetCopyright(this Assembly assembly)
Parameters
Type Name Description
System.Reflection.Assembly assembly

Specifies the current assembly.

Returns
Type Description
System.String

Returns the value of the Copyright attribute, or null, if the attibute was not found.

| Improve this Doc View Source

GetDescription(Assembly)

Gets the value of the current assembly's Description attribute.

Declaration
public static string GetDescription(this Assembly assembly)
Parameters
Type Name Description
System.Reflection.Assembly assembly

Specifies the current assembly.

Returns
Type Description
System.String

Returns the value of the Description attribute, or null, if the attibute was not found.

| Improve this Doc View Source

GetDirectory(Assembly)

Gets the directory of the current assembly.

Declaration
public static string GetDirectory(this Assembly assembly)
Parameters
Type Name Description
System.Reflection.Assembly assembly

Specifies the current assembly.

Returns
Type Description
System.String

Returns the directory of the current assembly without an ending directory separator.

| Improve this Doc View Source

GetFileName(Assembly)

Gets the file name of the current assembly.

Declaration
public static string GetFileName(this Assembly assembly)
Parameters
Type Name Description
System.Reflection.Assembly assembly

Specifies the current assembly.

Returns
Type Description
System.String

Returns the file name of the current assembly.

| Improve this Doc View Source

GetFileNameWithoutExtension(Assembly)

Gets the file name of the current assembly without the extension.

Declaration
public static string GetFileNameWithoutExtension(this Assembly assembly)
Parameters
Type Name Description
System.Reflection.Assembly assembly

Specifies the current assembly.

Returns
Type Description
System.String

Returns the file name of the current assembly without the extension.

| Improve this Doc View Source

GetProduct(Assembly)

Gets the value of the current assembly's Product attribute.

Declaration
public static string GetProduct(this Assembly assembly)
Parameters
Type Name Description
System.Reflection.Assembly assembly

Specifies the current assembly.

Returns
Type Description
System.String

Returns the value of the Product attribute, or null, if the attibute was not found.

| Improve this Doc View Source

GetProductVersion(Assembly)

Gets the product version associated with the current assembly.

Declaration
public static string GetProductVersion(this Assembly assembly)
Parameters
Type Name Description
System.Reflection.Assembly assembly

Specifies the current assembly.

Returns
Type Description
System.String

Returns the product version associated with the current assembly.

| Improve this Doc View Source

GetTitle(Assembly)

Gets the value of the current assembly's Title attribute.

Declaration
public static string GetTitle(this Assembly assembly)
Parameters
Type Name Description
System.Reflection.Assembly assembly

Specifies the current assembly.

Returns
Type Description
System.String

Returns the value of the Title attribute, or null, if the attibute was not found.

| Improve this Doc View Source

GetVersion(Assembly)

Gets the value of the current assembly's Version attribute.

Declaration
public static string GetVersion(this Assembly assembly)
Parameters
Type Name Description
System.Reflection.Assembly assembly

Specifies the current assembly.

Returns
Type Description
System.String

Returns the value of the Version attribute, or null, if the attibute was not found.

| Improve this Doc View Source

LoadEmbeddedResourceFile(Assembly, String)

Loads an embedded resource file from the current assembly.

Declaration
public static string LoadEmbeddedResourceFile(this Assembly assembly, string fileName)
Parameters
Type Name Description
System.Reflection.Assembly assembly

Specifies the current assembly.

System.String fileName

Specifies the name of a resource file to be loaded.

Returns
Type Description
System.String

Returns the contents of the requested resource file.

Remarks

This method loads the first resource file whose name matches the specified file name regardless of the file namespace.

| Improve this Doc View Source

LoadEmbeddedResourceFile(Assembly, String, String)

Loads an embedded resource file from the current assembly.

Declaration
public static string LoadEmbeddedResourceFile(this Assembly assembly, string fileName, string fileNamespace)
Parameters
Type Name Description
System.Reflection.Assembly assembly

Specifies the current assembly.

System.String fileName

Specifies the name of a resource file to be loaded.

System.String fileNamespace

Specifies the namespace of a resource file to be loaded. Can be null in which case the method loads the first resource file whose name matches the specified file name.

Returns
Type Description
System.String

Returns the contents of the requested resource file.

  • Improve this Doc
  • View Source
Back to top Copyright © 2017-2019 Juha Lähteenmäki
Generated by DocFX