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.153 -- Release Build+cfa0f66eec3b78014206cf98a152ef9e72791f21
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.