|
AssemblyExtensionsTryLoadAllReferences Method
|
Recursively attempts to load all assemblies referenced from the given assembly.
Namespace: GSF.ReflectionAssembly: GSF.Core (in GSF.Core.dll) Version: 2.4.220-beta+a56b2444ff27b37e053039e60f062b99378309bd
Syntax public static bool TryLoadAllReferences(
this Assembly assemblyInstance
)
GSF.Reflection.AssemblyExtensions.TryLoadAllReferences = function(assemblyInstance);
View SourceParameters
- assemblyInstance Assembly
- The assembly whose references are to be loaded.
Return Value
Booleantrue if the references were successfully loaded;
false otherwise.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
Assembly. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
Remarks
If an object is created from a type that is loaded from an assembly, and if that
assembly's references fail to load during instantiation, an exception may be thrown
from both the constructor and the finalizer of the object that was instantiated.
This method allows us to ensure that all referenced assemblies can be loaded
before attempting to instantiate a type from that assembly.
See Also