Class AssemblyHelper
- Namespace
- Xunit
- Assembly
- xunit.v3.runner.utility.netfx.dll
This class provides assistance with assembly resolution for missing assemblies.
public class AssemblyHelper : MarshalByRefObject, IDisposable
- Inheritance
-
AssemblyHelper
- Implements
- Inherited Members
Constructors
AssemblyHelper(string)
Constructs an instance using the given directory for resolution.
public AssemblyHelper(string directory)
Parameters
directorystringThe directory to use for resolving assemblies.
AssemblyHelper(string, IMessageSink?)
Constructs an instance using the given directory for resolution.
public AssemblyHelper(string directory, IMessageSink? diagnosticMessageSink)
Parameters
directorystringThe directory to use for resolving assemblies.
diagnosticMessageSinkIMessageSinkThe message sink to send diagnostics messages to.
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
InitializeLifetimeService()
Obtains a lifetime service object to control the lifetime policy for this instance.
[SecurityCritical]
public override sealed object InitializeLifetimeService()
Returns
- object
An object of type ILease used to control the lifetime policy for this instance. This is the current lifetime service object for this instance if one exists; otherwise, a new lifetime service object initialized to the value of the LeaseManagerPollTime property.
Exceptions
- SecurityException
The immediate caller does not have infrastructure permission.
SubscribeResolveForAssembly(string, IMessageSink?)
Subscribes to the appropriate assembly resolution event, to provide automatic assembly resolution for an assembly and any of its dependencies. Depending on the target platform, this may include the use of the .deps.json file generated during the build process.
public static IDisposable? SubscribeResolveForAssembly(string assemblyFileName, IMessageSink? diagnosticMessageSink = null)
Parameters
assemblyFileNamestringdiagnosticMessageSinkIMessageSink
Returns
- IDisposable
An object which, when disposed, un-subscribes.
SubscribeResolveForAssembly(Type, IMessageSink?)
Subscribes to the appropriate assembly resolution event, to provide automatic assembly resolution for an assembly and any of its dependencies. Depending on the target platform, this may include the use of the .deps.json file generated during the build process.
public static IDisposable? SubscribeResolveForAssembly(Type typeInAssembly, IMessageSink? diagnosticMessageSink = null)
Parameters
typeInAssemblyTypediagnosticMessageSinkIMessageSink
Returns
- IDisposable
An object which, when disposed, un-subscribes.