Class TypeResolver
Helper class to resolve System.
Inheritance
Namespace: EPiServer.Data.Dynamic
Assembly: EPiServer.Data.dll
Version: 12.0.3Syntax
public static class TypeResolver : Object
Properties
AutoResolve
A System.
Declaration
public static bool AutoResolve { get; set; }
Property Value
Type | Description |
---|---|
System. |
Remarks
See the Get
PrivateProbingPath
Declaration
public static string PrivateProbingPath { get; set; }
Property Value
Type | Description |
---|---|
System. |
Methods
ClearCache()
Clear the cache of Assembly Qualified Names to types
Declaration
public static void ClearCache()
GetType(String)
Declaration
public static Type GetType(string typeName)
Parameters
Type | Name | Description |
---|---|---|
System. |
typeName |
Returns
Type | Description |
---|---|
System. |
GetType(String, Boolean)
Tries to resolve the typeName
to a System.
Declaration
public static Type GetType(string typeName, bool throwOnError)
Parameters
Type | Name | Description |
---|---|---|
System. |
typeName | A typeName for a type, can be an Assembly Qualified Name for a type |
System. |
throwOnError | true to throw an exception if the type cannot be found; false to return null |
Returns
Type | Description |
---|---|
System. |
The System. |
Remarks
When the AutotypeName
to a System.
- Try to resolve the
typeName
to a System.Type using the System.Type. methodGet Type(System. String,System. Boolean,System. Boolean) - If
typeName
is a Assembly Qualified Name then all version numbers are removed from thetypeName
and then try again using System.Type. Get Type(System. String,System. Boolean,System. Boolean) - Remove all information except namespace and class names from the Assembly Qualified Name and then try again using System.
Type. Once anGet Type(System. String,System. Boolean,System. Boolean) typeName
has been resolved to a System.Type then that information is cached.
See Also
GetType(String, Boolean, FallbackTypeResolver)
Tries to resolve the typeName
to a System.
Declaration
public static Type GetType(string typeName, bool throwOnError, FallbackTypeResolver fallbackResolver)
Parameters
Type | Name | Description |
---|---|---|
System. |
typeName | An Assembly Qualified Name for a type |
System. |
throwOnError | true to throw an exception if the type cannot be found; false to return null |
Fallback |
fallbackResolver | The fallback resolver. |
Returns
Type | Description |
---|---|
System. |
The System. |
Remarks
When the Auto
- Try to resolve the Assembly Qualified Name to a System.
Type using the System.Type. methodGet Type(System. String,System. Boolean,System. Boolean) - Remove all version numbers from the Assembly Qualified Name and then try again using System.
Type. Get Type(System. String,System. Boolean,System. Boolean) - Remove all information except namespace and class names from the Assembly Qualified Name and then try again using System.
Type. Once an Assembly Qualified Name has been resolved to a System.Get Type(System. String,System. Boolean,System. Boolean) Type then that information is cached.