Search Results for

    Show / Hide Table of Contents

    Class MAssembly

    Represents a managed assembly, which is a reusable, versionable, and self-describing building block of a common language runtime application.

    Inheritance
    MAssembly
    Inherited Members
    MAssembly
    MAssembly
    Assembly: FlaxEngine.dll
    File: Engine/Scripting/ManagedCLR/MAssembly.h
    Syntax
    public class MAssembly

    Constructors

    ~MAssembly()

    Finalizes an instance of the MAssembly class.

    Declaration
    public ~MAssembly()

    MAssembly(MDomain* domain, const StringAnsiView& name)

    Initializes a new instance of the MAssembly class.

    Declaration
    public MAssembly(MDomain* domain, const StringAnsiView& name)
    Parameters
    MDomain domain

    The assembly domain.

    StringAnsiView name

    The assembly name.

    MAssembly(MDomain* domain, const StringAnsiView& name, const StringAnsiView& fullname, void* handle)

    Initializes a new instance of the MAssembly class.

    Declaration
    public MAssembly(MDomain* domain, const StringAnsiView& name, const StringAnsiView& fullname, void* handle)
    Parameters
    MDomain domain

    The assembly domain.

    StringAnsiView name

    The assembly name.

    StringAnsiView fullname

    The assembly full name.

    void handle

    The managed handle of the assembly.

    Fields

    Loaded

    Action fired when assembly gets loaded.

    Declaration
    public AssemblyDelegate Loaded
    Field Value
    AssemblyDelegate

    LoadFailed

    Action fired when assembly loading fails.

    Declaration
    public AssemblyDelegate LoadFailed
    Field Value
    AssemblyDelegate

    Loading

    Action fired when assembly starts loading.

    Declaration
    public AssemblyDelegate Loading
    Field Value
    AssemblyDelegate

    Unloaded

    Action fired when assembly gets unloaded.

    Declaration
    public AssemblyDelegate Unloaded
    Field Value
    AssemblyDelegate

    Unloading

    Action fired when assembly start unloading.

    Declaration
    public AssemblyDelegate Unloading
    Field Value
    AssemblyDelegate

    Methods

    GetAssemblyPath()

    Gets the assembly path.

    If assembly was made from scratch (empty), path will return null.

    Declaration
    public String GetAssemblyPath() const
    Returns
    String

    GetClass(const StringAnsiView& typeName)

    Attempts to find a managed class with the specified namespace and name in this assembly. Returns null if one cannot be found.

    Declaration
    public MClass* GetClass(const StringAnsiView& typeName) const
    Parameters
    StringAnsiView typeName

    The type name.

    Returns
    MClass

    The class object or null if failed to find it.

    GetClasses()

    Gets the classes lookup cache. Performs full initialization if not cached. The result cache contains all classes from the assembly.

    Declaration
    public ClassesDictionary GetClasses() const
    Returns
    ClassesDictionary

    GetDomain()

    Gets the parent domain.

    Declaration
    public MDomain* GetDomain() const
    Returns
    MDomain

    GetHandle()

    Declaration
    public void* GetHandle() const
    Returns
    void

    GetName()

    Gets the assembly name.

    Declaration
    public StringAnsi GetName() const
    Returns
    StringAnsi

    IsLoaded()

    Returns true if assembly has been loaded.

    Declaration
    public bool IsLoaded() const
    Returns
    bool

    IsLoading()

    Returns true if assembly is during loading state.

    Declaration
    public bool IsLoading() const
    Returns
    bool

    Load(const String& assemblyPath, const StringView& nativePath=StringView::Empty)

    Loads assembly for domain.

    Declaration
    public bool Load(const String& assemblyPath, const StringView& nativePath=StringView::Empty)
    Parameters
    String assemblyPath

    The assembly path.

    StringView nativePath

    The optional path to the native code assembly (eg. if C# assembly contains bindings).

    Returns
    bool

    True if cannot load, otherwise false

    ToString()

    Gets the assembly name as string.

    Declaration
    public String ToString() const
    Returns
    String

    Unload(bool isReloading=false)

    Cleanup data. Caller must ensure not to use any types from this assembly after it has been unloaded.

    Declaration
    public void Unload(bool isReloading=false)
    Parameters
    bool isReloading

    If true assembly is during reloading and should force release the runtime data.

    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat