Show / Hide Table of Contents

    Class ClrAssembly

    A Flame assembly that wraps a Cecil assembly definition.

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

    Constructors

    | Improve this Doc 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
    Mono.Cecil.AssemblyDefinition definition

    The assembly definition to wrap.

    ReferenceResolver resolver

    The reference resolver to use.

    | Improve this Doc 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
    Mono.Cecil.AssemblyDefinition definition

    The assembly definition to wrap.

    AssemblyResolver resolver

    The assembly resolver to use.

    TypeEnvironment typeEnvironment

    The type environment to use.

    Properties

    | Improve this Doc View Source

    Attributes

    Gets the member's attributes.

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

    Definition

    Gets the Cecil assembly definition wrapped by this assembly.

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

    A Cecil assembly definition.

    | Improve this Doc View Source

    FullName

    Gets the member's full name.

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

    Name

    Gets the member's unqualified name.

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

    Resolver

    Gets the reference resolver used by this assembly.

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

    The reference resolver.

    | Improve this Doc 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
    System.Object

    A synchronization object.

    | Improve this Doc 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
    System.Collections.Generic.IReadOnlyList<IType>

    A list of types that are defined in this assembly.

    Methods

    | Improve this Doc 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
    System.Action func

    The initialization function to run synchronously.

    Returns
    Type Description
    DeferredInitializer

    A deferred initializer object.

    | Improve this Doc 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
    System.Func<T> func

    The initialization function to run synchronously.

    Returns
    Type Description
    System.Lazy<T>

    A lazily initialized object.

    Type Parameters
    Name Description
    T

    The type of value to create.

    | Improve this Doc View Source

    Resolve(AssemblyNameReference)

    Resolves an assembly name reference as an assembly.

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

    An assembly name reference to resolve.

    Returns
    Type Description
    IAssembly

    The assembly referenced by assemblyRef.

    | Improve this Doc View Source

    Resolve(FieldReference)

    Resolves a field reference declared in this assembly.

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

    The field reference to resolve.

    Returns
    Type Description
    IField

    A field referred to by the reference.

    | Improve this Doc View Source

    Resolve(MethodReference)

    Resolves a method reference declared in this assembly.

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

    The method reference to resolve.

    Returns
    Type Description
    IMethod

    A method referred to by the reference.

    | Improve this Doc View Source

    Resolve(PropertyReference)

    Resolves a property reference declared in this assembly.

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

    The property reference to resolve.

    Returns
    Type Description
    IProperty

    A property referred to by the reference.

    | Improve this Doc View Source

    Resolve(TypeReference)

    Resolves a type reference declared in this assembly.

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

    The type reference to resolve.

    Returns
    Type Description
    IType

    A type referred to by the reference.

    | Improve this Doc 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
    System.Action func

    The function to run.

    | Improve this Doc 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
    System.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.

    | Improve this Doc 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
    Mono.Cecil.AssemblyDefinition definition

    The assembly definition to wrap.

    Returns
    Type Description
    ClrAssembly

    A Flame assembly.

    Implements

    IAssembly
    IMember
    • Improve this Doc
    • View Source
    Back to top Generated by DocFX