In This Article

BinaryAssembly Class

Represents a binary (source code-based) assembly.

public class BinaryAssembly : IBinaryAssembly, IAssembly, IBinaryAssemblyMetadata
Inheritance:
object object
Implements:
IBinaryAssembly IAssembly IBinaryAssemblyMetadata

Constructors

BinaryAssembly(IAssemblyName, IBinaryAssemblyMetadata?, IBinaryAssemblyReferenceCollection, IEnumerable<ITypeDefinition>, bool)

Initializes an instance of the class.

public BinaryAssembly(IAssemblyName assemblyName, IBinaryAssemblyMetadata? metadata, IBinaryAssemblyReferenceCollection assemblyRefs, IEnumerable<ITypeDefinition> typeDefs, bool hasLoadErrors)
Parameter Type Description
assemblyName IAssemblyName

The IAssemblyName to use.

metadata IBinaryAssemblyMetadata

The assembly metadata.

assemblyRefs IBinaryAssemblyReferenceCollection

The collection of assembly references for this assembly.

typeDefs IEnumerable<ITypeDefinition>

The exported type definitions.

hasLoadErrors bool

Whether load errors were encountered when using reflection on the related .NET assembly.

Properties

AssemblyReferences

The collection of assembly references for this assembly.

public IBinaryAssemblyReferenceCollection AssemblyReferences { get; }

Property Value

IBinaryAssemblyReferenceCollection

Documentation

The IAssemblyDocumentation that provides access to this assembly's type and member documentation.

public IAssemblyDocumentation? Documentation { get; set; }

Property Value

IAssemblyDocumentation

GlobalNamespace

The entry point into the INamespaceDefinition tree defined in this assembly.

public INamespaceDefinition GlobalNamespace { get; }

Property Value

INamespaceDefinition

HasLoadErrors

Indicates whether load errors were encountered when using reflection on the related .NET assembly.

public bool HasLoadErrors { get; }

Property Value

bool

LastModifiedDateTime

The DateTime at which the assembly was last modified, if known.

public DateTime? LastModifiedDateTime { get; }

Property Value

DateTime?

Location

The location of the assembly, if known.

public string? Location { get; }

Property Value

string

Name

The simple name of the assembly.

public string? Name { get; }

Property Value

string

Namespaces

The collection of INamespaceDefinition objects defined in this assembly.

public INamespaceDefinitionCollection Namespaces { get; }

Property Value

INamespaceDefinitionCollection

Size

The size of the assembly, if known.

public long? Size { get; }

Property Value

long?

Methods

GetAssemblyName()

Returns an IAssemblyName that contains assembly name information.

public IAssemblyName GetAssemblyName()

Returns

IAssemblyName

ToString()

Returns the string representation of this object.

public override string ToString()

Returns

string:

The string representation of this object.

ToTreeString()

Outputs a string indicating the contents of the assembly in tree form.

public string ToTreeString()

Returns

string

Inherited Members

Extension Methods