PostSharp SDK 2023.0 / / Class Reference / Post­Sharp.​Sdk.​Code­Model Namespace / Domain Class / Domain Methods / Domain.​Load­Assembly Method

Domain.LoadAssembly Method

Loads an assembly (given by file name) into the current domain and specifies whether the assembly should be lazily loaded or not.

Namespace:  PostSharp.Sdk.CodeModel
Assembly:  PostSharp.Compiler.Engine (in PostSharp.Compiler.Engine.dll) Version: 2023.0.3.0 (2023.0.3.0)
Syntax
C#
public AssemblyEnvelope LoadAssembly(
	string assemblyLocation,
	LoadAssemblyOptions options = LoadAssemblyOptions.None
)

Parameters

assemblyLocation
Type: System.String
Full assemblyLocation of the physical location of the assembly to be loaded.
options (Optional)
Type: PostSharp.Sdk.CodeModel.LoadAssemblyOptions

[Missing <param name="options"/> documentation for "M:PostSharp.Sdk.CodeModel.Domain.LoadAssembly(System.String,PostSharp.Sdk.CodeModel.LoadAssemblyOptions)"]

Return Value

Type: AssemblyEnvelope
The AssemblyEnvelope representing the loaded assembly.
Remarks
Typically, the principal assembly is loaded completely at first time and referenced assemblies are loaded lazily.
See Also