KGy SOFT

ResolveTypeOptions Enumeration

KGy SOFT Core Libraries Help
Provides options for the Reflector.ResolveType methods.

Namespace:  KGySoft.Reflection
Assembly:  KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 5.0.0
Syntax

[FlagsAttribute]
public enum ResolveTypeOptions
Members

  Member nameValueDescription
None0

Represents no enabled options.

TryToLoadAssemblies1

If this flag is enabled, then the Reflector.ResolveType methods try to load the assemblies optionally present in the type name if they are not loaded yet. Otherwise, the assemblies are tried to be located among the already loaded assemblies.

Default state at Reflector.ResolveType methods: Enabled

AllowPartialAssemblyMatch2

If this flag is enabled, then the Reflector.ResolveType methods allow to resolve assembly names optionally present in the type name by partial name. If this flag is disabled, then the provided assembly information must match (which still can be partial names).

If a type name is specified without an assembly, then this flag is ignored (as if the AllowIgnoreAssemblyName was set).

Note Note
Depending on the type system of the current platform it can happen that new assemblies of unmatching identity are loaded even if this flag is disabled. In such case the loaded assemblies are ignored.
Tip Tip
Forwarded types can be loaded even if this flag is disabled but only if the old assembly of the exact identity can be resolved. So for example, to allow a type, which was forwarded from the mscorlib 4.0 assembly, to be resolved by an mscorlib 2.0 identity, this flag should be enabled.

Default state at Reflector.ResolveType methods: Enabled

AllowIgnoreAssemblyName4

If a type is specified with an assembly name, which cannot be resolved at all, then this flag makes possible to completely ignore the assembly information and that the Reflector.ResolveType methods can return a type by its full name from any loaded assembly.

If a type name is specified without an assembly, then it will be tried to be resolved from the loaded assemblies as if this flag was enabled.

If this flag is enabled, then the AllowPartialAssemblyMatch flag is ignored.

Default state at Reflector.ResolveType methods: Disabled

IgnoreCase8

If this flag is enabled, then the type name is identified in a case-insensitive manner.

Note Note
Assembly name is always resolved in a case-insensitive manner.

Default state at Reflector.ResolveType methods: Disabled

ThrowError16

If this flag is enabled and the type cannot be resolved, then a ReflectionException will be thrown from the Reflector.ResolveType methods.

Default state at Reflector.ResolveType methods: Disabled

See Also

Reference