Search Results for

    Show / Hide Table of Contents
    View Source

    Class AssemblyExtensions

    Inheritance
    System.Object
    Namespace: Umbraco.Extensions
    Assembly: Umbraco.Core.dll
    Syntax
    public static class AssemblyExtensions

    Methods

    View Source

    GetAssemblyFile(Assembly)

    Returns the file used to load the assembly

    Declaration
    public static FileInfo GetAssemblyFile(this Assembly assembly)
    Parameters
    Type Name Description
    System.Reflection.Assembly assembly
    Returns
    Type Description
    FileInfo
    View Source

    GetAssemblyFile(AssemblyName)

    Returns the file used to load the assembly

    Declaration
    public static FileInfo? GetAssemblyFile(this AssemblyName assemblyName)
    Parameters
    Type Name Description
    System.Reflection.AssemblyName assemblyName
    Returns
    Type Description
    System.Nullable<FileInfo>
    View Source

    GetRootDirectorySafe(Assembly)

    Utility method that returns the path to the root of the application, by getting the path to where the assembly where this method is included is present, then traversing until it's past the /bin directory. Ie. this makes it work even if the assembly is in a /bin/debug or /bin/release folder

    Declaration
    public static string GetRootDirectorySafe(this Assembly executingAssembly)
    Parameters
    Type Name Description
    System.Reflection.Assembly executingAssembly
    Returns
    Type Description
    System.String
    View Source

    IsAppCodeAssembly(Assembly)

    Returns true if the assembly is the App_Code assembly

    Declaration
    public static bool IsAppCodeAssembly(this Assembly assembly)
    Parameters
    Type Name Description
    System.Reflection.Assembly assembly
    Returns
    Type Description
    System.Boolean
    View Source

    IsGlobalAsaxAssembly(Assembly)

    Returns true if the assembly is the compiled global asax.

    Declaration
    public static bool IsGlobalAsaxAssembly(this Assembly assembly)
    Parameters
    Type Name Description
    System.Reflection.Assembly assembly
    Returns
    Type Description
    System.Boolean
    • Improve this Doc
    • View Source
    In This Article
    • Methods
      • GetAssemblyFile(Assembly)
      • GetAssemblyFile(AssemblyName)
      • GetRootDirectorySafe(Assembly)
      • IsAppCodeAssembly(Assembly)
      • IsGlobalAsaxAssembly(Assembly)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX