|
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.207-beta+1781b796b2aa7a54013a031eb432fe4ccee31867
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