Search Results for

    Show / Hide Table of Contents

    Class ClrAssembly

    A Flame assembly that wraps a Cecil assembly definition.

    Inheritance
    object
    ClrAssembly
    Implements
    IAssembly
    IMember
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Flame.Clr
    Assembly: Flame.Clr.dll
    Syntax
    public sealed class ClrAssembly : IAssembly, IMember

    Constructors

    | Edit this page View Source

    ClrAssembly(AssemblyDefinition, ReferenceResolver)

    Creates a Flame assembly that wraps a Cecil assembly definition.

    Declaration
    public ClrAssembly(AssemblyDefinition definition, ReferenceResolver resolver)
    Parameters
    Type Name Description
    AssemblyDefinition definition

    The assembly definition to wrap.

    ReferenceResolver resolver

    The reference resolver to use.

    | Edit this page View Source

    ClrAssembly(AssemblyDefinition, AssemblyResolver, TypeEnvironment)

    Creates a Flame assembly that wraps a Cecil assembly definition.

    Declaration
    public ClrAssembly(AssemblyDefinition definition, AssemblyResolver resolver, TypeEnvironment typeEnvironment)
    Parameters
    Type Name Description
    AssemblyDefinition definition

    The assembly definition to wrap.

    AssemblyResolver resolver

    The assembly resolver to use.

    TypeEnvironment typeEnvironment

    The type environment to use.

    Properties

    | Edit this page View Source

    Attributes

    Gets the member's attributes.

    Declaration
    public AttributeMap Attributes { get; }
    Property Value
    Type Description
    AttributeMap
    | Edit this page View Source

    Definition

    Gets the Cecil assembly definition wrapped by this assembly.

    Declaration
    public AssemblyDefinition Definition { get; }
    Property Value
    Type Description
    AssemblyDefinition

    A Cecil assembly definition.

    | Edit this page View Source

    FullName

    Gets the member's full name.

    Declaration
    public QualifiedName FullName { get; }
    Property Value
    Type Description
    QualifiedName
    | Edit this page View Source

    Name

    Gets the member's unqualified name.

    Declaration
    public UnqualifiedName Name { get; }
    Property Value
    Type Description
    UnqualifiedName
    | Edit this page View Source

    Resolver

    Gets the reference resolver used by this assembly.

    Declaration
    public ReferenceResolver Resolver { get; }
    Property Value
    Type Description
    ReferenceResolver

    The reference resolver.

    | Edit this page View Source

    SyncRoot

    Gets the object that is used for synchronizing access to the IL assembly wrapped by this Flame assembly.

    Declaration
    public object SyncRoot { get; }
    Property Value
    Type Description
    object

    A synchronization object.

    | Edit this page View Source

    Types

    Gets a list of all top-level types defined in this assembly.

    Declaration
    public IReadOnlyList<IType> Types { get; }
    Property Value
    Type Description
    IReadOnlyList<IType>

    A list of types that are defined in this assembly.

    Methods

    | Edit this page View Source

    CreateSynchronizedInitializer(Action)

    Creates a deferred initializer object from an initializer function that is run in a single-threaded fashion with respect to other functions operating on this assembly.

    Declaration
    public DeferredInitializer CreateSynchronizedInitializer(Action func)
    Parameters
    Type Name Description
    Action func

    The initialization function to run synchronously.

    Returns
    Type Description
    DeferredInitializer

    A deferred initializer object.

    | Edit this page View Source

    CreateSynchronizedLazy<T>(Func<T>)

    Creates a lazily initialized object from an initializer function that is run in a single-threaded fashion with respect to other functions operating on this assembly.

    Declaration
    public Lazy<T> CreateSynchronizedLazy<T>(Func<T> func)
    Parameters
    Type Name Description
    Func<T> func

    The initialization function to run synchronously.

    Returns
    Type Description
    Lazy<T>

    A lazily initialized object.

    Type Parameters
    Name Description
    T

    The type of value to create.

    | Edit this page View Source

    Resolve(AssemblyNameReference)

    Resolves an assembly name reference as an assembly.

    Declaration
    public IAssembly Resolve(AssemblyNameReference assemblyRef)
    Parameters
    Type Name Description
    AssemblyNameReference assemblyRef

    An assembly name reference to resolve.

    Returns
    Type Description
    IAssembly

    The assembly referenced by assemblyRef.

    | Edit this page View Source

    Resolve(FieldReference)

    Resolves a field reference declared in this assembly.

    Declaration
    public IField Resolve(FieldReference fieldRef)
    Parameters
    Type Name Description
    FieldReference fieldRef

    The field reference to resolve.

    Returns
    Type Description
    IField

    A field referred to by the reference.

    | Edit this page View Source

    Resolve(MethodReference)

    Resolves a method reference declared in this assembly.

    Declaration
    public IMethod Resolve(MethodReference methodRef)
    Parameters
    Type Name Description
    MethodReference methodRef

    The method reference to resolve.

    Returns
    Type Description
    IMethod

    A method referred to by the reference.

    | Edit this page View Source

    Resolve(PropertyReference)

    Resolves a property reference declared in this assembly.

    Declaration
    public IProperty Resolve(PropertyReference propertyRef)
    Parameters
    Type Name Description
    PropertyReference propertyRef

    The property reference to resolve.

    Returns
    Type Description
    IProperty

    A property referred to by the reference.

    | Edit this page View Source

    Resolve(TypeReference)

    Resolves a type reference declared in this assembly.

    Declaration
    public IType Resolve(TypeReference typeRef)
    Parameters
    Type Name Description
    TypeReference typeRef

    The type reference to resolve.

    Returns
    Type Description
    IType

    A type referred to by the reference.

    | Edit this page View Source

    RunSynchronized(Action)

    Runs a function in a single-threaded fashion with respect to other functions operating on this assembly.

    Declaration
    public void RunSynchronized(Action func)
    Parameters
    Type Name Description
    Action func

    The function to run.

    | Edit this page View Source

    RunSynchronized<T>(Func<T>)

    Runs a function in a single-threaded fashion with respect to other functions operating on this assembly.

    Declaration
    public T RunSynchronized<T>(Func<T> func)
    Parameters
    Type Name Description
    Func<T> func

    The function to run.

    Returns
    Type Description
    T

    The function's return value.

    Type Parameters
    Name Description
    T

    The type of value produced by the function.

    | Edit this page View Source

    Wrap(AssemblyDefinition)

    Wraps a CIL assembly definition in a Flame assembly, setting up an assembly resolver and type system.

    Declaration
    public static ClrAssembly Wrap(AssemblyDefinition definition)
    Parameters
    Type Name Description
    AssemblyDefinition definition

    The assembly definition to wrap.

    Returns
    Type Description
    ClrAssembly

    A Flame assembly.

    | Edit this page View Source

    Wrap(AssemblyDefinition, ReferenceResolver)

    Wraps a CIL assembly definition in a Flame assembly using an existing reference resolver.

    Declaration
    public static ClrAssembly Wrap(AssemblyDefinition definition, ReferenceResolver resolver)
    Parameters
    Type Name Description
    AssemblyDefinition definition

    The assembly definition to wrap.

    ReferenceResolver resolver

    The reference resolver to register the assembly with.

    Returns
    Type Description
    ClrAssembly

    A Flame assembly.

    Implements

    IAssembly
    IMember

    Extension Methods

    AccessModifierAttribute.GetAccessModifier(IMember)
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX