AssemblyExtensionsTryLoadAllReferences Method
Recursively attempts to load all assemblies referenced from the given assembly.
Namespace: Gemstone.Reflection.AssemblyExtensionsAssembly: Gemstone.Common (in Gemstone.Common.dll) Version: 1.0.128 -- Release Build+d050cfc5563c89a1188cc3c6b2d417530856f490
public static bool TryLoadAllReferences(
this Assembly instance
)
<ExtensionAttribute>
Public Shared Function TryLoadAllReferences (
instance As Assembly
) As Boolean
public:
[ExtensionAttribute]
static bool TryLoadAllReferences(
Assembly^ instance
)
Gemstone.Reflection.AssemblyExtensions.AssemblyExtensions.TryLoadAllReferences = function(instance);
- instance Assembly
- The assembly whose references are to be loaded.
Booleantrue if the references were successfully loaded;
false otherwise.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).
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.