Class ModelType
Represents type declarations: class types, interface types, array types, value types, enumeration types, type parameters, generic type definitions, and open or closed constructed generic types.
Inheritance
Namespace: Umbraco.Cms.Core.Models.PublishedContent
Assembly: Umbraco.Core.dll
Syntax
public class ModelType : Type
Examples
ModelType.For("alias") typeof (IEnumerable{}).MakeGenericType(ModelType.For("alias")) Model.For("alias").MakeArrayType()
Properties
View SourceAssembly
Gets the System.Reflection.Assembly in which the type is declared. For generic types, gets the System.Reflection.Assembly in which the generic type is defined.
Declaration
public override Assembly Assembly { get; }
Property Value
| Type | Description |
|---|---|
| Assembly | An System.Reflection.Assembly instance that describes the assembly containing the current type. For generic types, the instance describes the assembly that contains the generic type definition, not the assembly that creates and uses a particular constructed type. |
AssemblyQualifiedName
Gets the assembly-qualified name of the type, which includes the name of the assembly from which this System.Type object was loaded.
Declaration
public override string AssemblyQualifiedName { get; }
Property Value
| Type | Description |
|---|---|
| string | The assembly-qualified name of the System.Type, which includes the name of the assembly from which the System.Type was loaded, or null if the current instance represents a generic type parameter. |
BaseType
Gets the type from which the current System.Type directly inherits.
Declaration
public override Type? BaseType { get; }
Property Value
| Type | Description |
|---|---|
| Type | The System.Type from which the current System.Type directly inherits, or null if the current |
ContentTypeAlias
Gets the content type alias.
Declaration
public string ContentTypeAlias { get; }
Property Value
| Type | Description |
|---|---|
| string |
FullName
Gets the fully qualified name of the type, including its namespace but not its assembly.
Declaration
public override string FullName { get; }
Property Value
| Type | Description |
|---|---|
| string | The fully qualified name of the type, including its namespace but not its assembly; or null if the current instance represents a generic type parameter, an array type, pointer type, or |
GUID
Gets the GUID associated with the System.Type.
Declaration
public override Guid GUID { get; }
Property Value
| Type | Description |
|---|---|
| Guid | The GUID associated with the System.Type. |
Module
Gets the module (the DLL) in which the current System.Type is defined.
Declaration
public override Module Module { get; }
Property Value
| Type | Description |
|---|---|
| Module | The module in which the current System.Type is defined. |
Name
Gets the name of the current member.
Declaration
public override string Name { get; }
Property Value
| Type | Description |
|---|---|
| string | A string containing the name of this member. |
Namespace
Gets the namespace of the System.Type.
Declaration
public override string Namespace { get; }
Property Value
| Type | Description |
|---|---|
| string | The namespace of the System.Type; null if the current instance has no namespace or represents a generic parameter. |
UnderlyingSystemType
Indicates the type provided by the common language runtime that represents this type.
Declaration
public override Type UnderlyingSystemType { get; }
Property Value
| Type | Description |
|---|---|
| Type | The underlying system type for the System.Type. |
Methods
View SourceEquals(Type, Type)
Gets a value indicating whether two System.Type instances are equal.
Declaration
public static bool Equals(Type t1, Type t2)
Parameters
| Type | Name | Description |
|---|---|---|
| Type | t1 | The first instance. |
| Type | t2 | The second instance. |
Returns
| Type | Description |
|---|---|
| bool | A value indicating whether the two instances are equal. |
Remarks
Knows how to compare ModelType instances.
For(string?)
Gets the model type for a published element type.
Declaration
public static ModelType For(string? alias)
Parameters
| Type | Name | Description |
|---|---|---|
| string | alias | The published element type alias. |
Returns
| Type | Description |
|---|---|
| ModelType | The model type for the published element type. |
GetAttributeFlagsImpl()
When overridden in a derived class, implements the System.Type.Attributes property and gets a bitwise combination of enumeration values that indicate the attributes associated with the System.Type.
Declaration
protected override TypeAttributes GetAttributeFlagsImpl()
Returns
| Type | Description |
|---|---|
| TypeAttributes | A System.Reflection.TypeAttributes object representing the attribute set of the System.Type. |
GetConstructorImpl(BindingFlags, Binder?, CallingConventions, Type[], ParameterModifier[]?)
When overridden in a derived class, searches for a constructor whose parameters match the specified argument types and modifiers, using the specified binding constraints and the specified calling convention.
Declaration
protected override ConstructorInfo? GetConstructorImpl(BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[] types, ParameterModifier[]? modifiers)
Parameters
| Type | Name | Description |
|---|---|---|
| BindingFlags | bindingAttr | A bitwise combination of the enumeration values that specify how the search is conducted. -or- System.Reflection.BindingFlags.Default to return null. |
| Binder | binder | An object that defines a set of properties and enables binding, which can involve selection of an overloaded method, coercion of argument types, and invocation of a member through reflection. -or- A null reference ( |
| CallingConventions | callConvention | The object that specifies the set of rules to use regarding the order and layout of arguments, how the return value is passed, what registers are used for arguments, and the stack is cleaned up. |
| Type[] | types | An array of System.Type objects representing the number, order, and type of the parameters for the constructor to get. -or- An empty array of the type System.Type (that is, Type[] types = new Type[0]) to get a constructor that takes no parameters. |
| ParameterModifier[] | modifiers | An array of System.Reflection.ParameterModifier objects representing the attributes associated with the corresponding element in the |
Returns
| Type | Description |
|---|---|
| ConstructorInfo | A System.Reflection.ConstructorInfo object representing the constructor that matches the specified requirements, if found; otherwise, null. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |
-or- One of the elements in |
| ArgumentException |
-or-
-or-
|
| NotSupportedException | The current type is a System.Reflection.Emit.TypeBuilder or System.Reflection.Emit.GenericTypeParameterBuilder. |
GetConstructors(BindingFlags)
When overridden in a derived class, searches for the constructors defined for the current System.Type, using the specified BindingFlags.
Declaration
public override ConstructorInfo[] GetConstructors(BindingFlags bindingAttr)
Parameters
| Type | Name | Description |
|---|---|---|
| BindingFlags | bindingAttr | A bitwise combination of the enumeration values that specify how the search is conducted. -or- System.Reflection.BindingFlags.Default to return an empty array. |
Returns
| Type | Description |
|---|---|
| ConstructorInfo[] | An array of System.Reflection.ConstructorInfo objects representing all constructors defined for the current System.Type that match the specified binding constraints, including the type initializer if it's defined. Returns an empty array of type System.Reflection.ConstructorInfo if no constructors are defined for the current System.Type, if none of the defined constructors match the binding constraints, or if the current System.Type represents a type parameter in the definition of a generic type or generic method. |
GetCustomAttributes(bool)
When overridden in a derived class, returns an array of all custom attributes applied to this member.
Declaration
public override object[] GetCustomAttributes(bool inherit)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | inherit | true to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events. |
Returns
| Type | Description |
|---|---|
| object[] | An array that contains all the custom attributes applied to this member, or an array with zero elements if no attributes are defined. |
Exceptions
| Type | Condition |
|---|---|
| InvalidOperationException | This member belongs to a type that is loaded into the reflection-only context. See How to: Load Assemblies into the Reflection-Only Context. |
| TypeLoadException | A custom attribute type could not be loaded. |
GetCustomAttributes(Type, bool)
When overridden in a derived class, returns an array of custom attributes applied to this member and identified by System.Type.
Declaration
public override object[] GetCustomAttributes(Type attributeType, bool inherit)
Parameters
| Type | Name | Description |
|---|---|---|
| Type | attributeType | The type of attribute to search for. Only attributes that are assignable to this type are returned. |
| bool | inherit | true to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events. |
Returns
| Type | Description |
|---|---|
| object[] | An array of custom attributes applied to this member, or an array with zero elements if no attributes assignable to |
Exceptions
| Type | Condition |
|---|---|
| TypeLoadException | A custom attribute type cannot be loaded. |
| ArgumentNullException | If |
| InvalidOperationException | This member belongs to a type that is loaded into the reflection-only context. See How to: Load Assemblies into the Reflection-Only Context. |
GetElementType()
When overridden in a derived class, returns the System.Type of the object encompassed or referred to by the current array, pointer or reference type.
Declaration
public override Type? GetElementType()
Returns
| Type | Description |
|---|---|
| Type | The System.Type of the object encompassed or referred to by the current array, pointer, or reference type, or null if the current System.Type is not an array or a pointer, or is not passed by reference, or represents a generic type or a type parameter in the definition of a generic type or generic method. |
GetEvent(string, BindingFlags)
When overridden in a derived class, returns the System.Reflection.EventInfo object representing the specified event, using the specified binding constraints.
Declaration
public override EventInfo? GetEvent(string name, BindingFlags bindingAttr)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The name of an event that is declared or inherited by the current System.Type. |
| BindingFlags | bindingAttr | A bitwise combination of the enumeration values that specify how the search is conducted. -or- System.Reflection.BindingFlags.Default to return null. |
Returns
| Type | Description |
|---|---|
| EventInfo | The object representing the specified event that is declared or inherited by the current System.Type, if found; otherwise, null. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |
|
GetEvents(BindingFlags)
When overridden in a derived class, searches for events that are declared or inherited by the current System.Type, using the specified binding constraints.
Declaration
public override EventInfo[] GetEvents(BindingFlags bindingAttr)
Parameters
| Type | Name | Description |
|---|---|---|
| BindingFlags | bindingAttr | A bitwise combination of the enumeration values that specify how the search is conducted. -or- System.Reflection.BindingFlags.Default to return an empty array. |
Returns
| Type | Description |
|---|---|
| EventInfo[] | An array of System.Reflection.EventInfo objects representing all events that are declared or inherited by the current System.Type that match the specified binding constraints. -or- An empty array of type System.Reflection.EventInfo, if the current System.Type does not have events, or if none of the events match the binding constraints. |
GetField(string, BindingFlags)
Searches for the specified field, using the specified binding constraints.
Declaration
public override FieldInfo? GetField(string name, BindingFlags bindingAttr)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The string containing the name of the data field to get. |
| BindingFlags | bindingAttr | A bitwise combination of the enumeration values that specify how the search is conducted. -or- System.Reflection.BindingFlags.Default to return null. |
Returns
| Type | Description |
|---|---|
| FieldInfo | An object representing the field that matches the specified requirements, if found; otherwise, null. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |
|
GetFields(BindingFlags)
When overridden in a derived class, searches for the fields defined for the current System.Type, using the specified binding constraints.
Declaration
public override FieldInfo[] GetFields(BindingFlags bindingAttr)
Parameters
| Type | Name | Description |
|---|---|---|
| BindingFlags | bindingAttr | A bitwise combination of the enumeration values that specify how the search is conducted. -or- System.Reflection.BindingFlags.Default to return an empty array. |
Returns
| Type | Description |
|---|---|
| FieldInfo[] | An array of System.Reflection.FieldInfo objects representing all fields defined for the current System.Type that match the specified binding constraints. -or- An empty array of type System.Reflection.FieldInfo, if no fields are defined for the current System.Type, or if none of the defined fields match the binding constraints. |
GetInterface(string, bool)
When overridden in a derived class, searches for the specified interface, specifying whether to do a case-insensitive search for the interface name.
Declaration
public override Type? GetInterface(string name, bool ignoreCase)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The string containing the name of the interface to get. For generic interfaces, this is the mangled name. |
| bool | ignoreCase |
-or- false to perform a case-sensitive search for all parts of |
Returns
| Type | Description |
|---|---|
| Type | An object representing the interface with the specified name, implemented or inherited by the current System.Type, if found; otherwise, null. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |
|
| AmbiguousMatchException | The current System.Type represents a type that implements the same generic interface with different type arguments. |
GetInterfaces()
When overridden in a derived class, gets all the interfaces implemented or inherited by the current System.Type.
Declaration
public override Type[] GetInterfaces()
Returns
| Type | Description |
|---|---|
| Type[] | An array of System.Type objects representing all the interfaces implemented or inherited by the current System.Type. -or- An empty array of type System.Type, if no interfaces are implemented or inherited by the current System.Type. |
Exceptions
| Type | Condition |
|---|---|
| TargetInvocationException | A static initializer is invoked and throws an exception. |
GetMembers(BindingFlags)
When overridden in a derived class, searches for the members defined for the current System.Type, using the specified binding constraints.
Declaration
public override MemberInfo[] GetMembers(BindingFlags bindingAttr)
Parameters
| Type | Name | Description |
|---|---|---|
| BindingFlags | bindingAttr | A bitwise combination of the enumeration values that specify how the search is conducted. -or- System.Reflection.BindingFlags.Default to return an empty array. |
Returns
| Type | Description |
|---|---|
| MemberInfo[] | An array of System.Reflection.MemberInfo objects representing all members defined for the current System.Type that match the specified binding constraints. -or- An empty array if no members are defined for the current System.Type, or if none of the defined members match the binding constraints. |
GetMethodImpl(string, BindingFlags, Binder?, CallingConventions, Type[]?, ParameterModifier[]?)
When overridden in a derived class, searches for the specified method whose parameters match the specified argument types and modifiers, using the specified binding constraints and the specified calling convention.
Declaration
protected override MethodInfo? GetMethodImpl(string name, BindingFlags bindingAttr, Binder? binder, CallingConventions callConvention, Type[]? types, ParameterModifier[]? modifiers)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The string containing the name of the method to get. |
| BindingFlags | bindingAttr | A bitwise combination of the enumeration values that specify how the search is conducted. -or- System.Reflection.BindingFlags.Default to return null. |
| Binder | binder | An object that defines a set of properties and enables binding, which can involve selection of an overloaded method, coercion of argument types, and invocation of a member through reflection. -or- A null reference ( |
| CallingConventions | callConvention | The object that specifies the set of rules to use regarding the order and layout of arguments, how the return value is passed, what registers are used for arguments, and what process cleans up the stack. |
| Type[] | types | An array of System.Type objects representing the number, order, and type of the parameters for the method to get. -or- An empty array of the type System.Type (that is, Type[] types = new Type[0]) to get a method that takes no parameters. -or- |
| ParameterModifier[] | modifiers | An array of System.Reflection.ParameterModifier objects representing the attributes associated with the corresponding element in the |
Returns
| Type | Description |
|---|---|
| MethodInfo | An object representing the method that matches the specified requirements, if found; otherwise, null. |
Exceptions
| Type | Condition |
|---|---|
| AmbiguousMatchException | More than one method is found with the specified name and matching the specified binding constraints. |
| ArgumentNullException |
|
| ArgumentException |
-or-
-or-
|
| NotSupportedException | The current type is a System.Reflection.Emit.TypeBuilder or System.Reflection.Emit.GenericTypeParameterBuilder. |
GetMethods(BindingFlags)
When overridden in a derived class, searches for the methods defined for the current System.Type, using the specified binding constraints.
Declaration
public override MethodInfo[] GetMethods(BindingFlags bindingAttr)
Parameters
| Type | Name | Description |
|---|---|---|
| BindingFlags | bindingAttr | A bitwise combination of the enumeration values that specify how the search is conducted. -or- System.Reflection.BindingFlags.Default to return an empty array. |
Returns
| Type | Description |
|---|---|
| MethodInfo[] | An array of System.Reflection.MethodInfo objects representing all methods defined for the current System.Type that match the specified binding constraints. -or- An empty array of type System.Reflection.MethodInfo, if no methods are defined for the current System.Type, or if none of the defined methods match the binding constraints. |
GetNestedType(string, BindingFlags)
When overridden in a derived class, searches for the specified nested type, using the specified binding constraints.
Declaration
public override Type? GetNestedType(string name, BindingFlags bindingAttr)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The string containing the name of the nested type to get. |
| BindingFlags | bindingAttr | A bitwise combination of the enumeration values that specify how the search is conducted. -or- System.Reflection.BindingFlags.Default to return null. |
Returns
| Type | Description |
|---|---|
| Type | An object representing the nested type that matches the specified requirements, if found; otherwise, null. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |
|
GetNestedTypes(BindingFlags)
When overridden in a derived class, searches for the types nested in the current System.Type, using the specified binding constraints.
Declaration
public override Type[] GetNestedTypes(BindingFlags bindingAttr)
Parameters
| Type | Name | Description |
|---|---|---|
| BindingFlags | bindingAttr | A bitwise combination of the enumeration values that specify how the search is conducted. -or- System.Reflection.BindingFlags.Default to return null. |
Returns
| Type | Description |
|---|---|
| Type[] | An array of System.Type objects representing all the types nested in the current System.Type that match the specified binding constraints (the search is not recursive), or an empty array of type System.Type, if no nested types are found that match the binding constraints. |
GetProperties(BindingFlags)
When overridden in a derived class, searches for the properties of the current System.Type, using the specified binding constraints.
Declaration
public override PropertyInfo[] GetProperties(BindingFlags bindingAttr)
Parameters
| Type | Name | Description |
|---|---|---|
| BindingFlags | bindingAttr | A bitwise combination of the enumeration values that specify how the search is conducted. -or- System.Reflection.BindingFlags.Default to return an empty array. |
Returns
| Type | Description |
|---|---|
| PropertyInfo[] | An array of objects representing all properties of the current System.Type that match the specified binding constraints. -or- An empty array of type System.Reflection.PropertyInfo, if the current System.Type does not have properties, or if none of the properties match the binding constraints. |
GetPropertyImpl(string, BindingFlags, Binder?, Type?, Type[]?, ParameterModifier[]?)
When overridden in a derived class, searches for the specified property whose parameters match the specified argument types and modifiers, using the specified binding constraints.
Declaration
protected override PropertyInfo? GetPropertyImpl(string name, BindingFlags bindingAttr, Binder? binder, Type? returnType, Type[]? types, ParameterModifier[]? modifiers)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The string containing the name of the property to get. |
| BindingFlags | bindingAttr | A bitwise combination of the enumeration values that specify how the search is conducted. -or- System.Reflection.BindingFlags.Default to return null. |
| Binder | binder | An object that defines a set of properties and enables binding, which can involve selection of an overloaded member, coercion of argument types, and invocation of a member through reflection. -or- A null reference ( |
| Type | returnType | The return type of the property. |
| Type[] | types | An array of System.Type objects representing the number, order, and type of the parameters for the indexed property to get. -or- An empty array of the type System.Type (that is, Type[] types = new Type[0]) to get a property that is not indexed. |
| ParameterModifier[] | modifiers | An array of System.Reflection.ParameterModifier objects representing the attributes associated with the corresponding element in the |
Returns
| Type | Description |
|---|---|
| PropertyInfo | An object representing the property that matches the specified requirements, if found; otherwise, null. |
Exceptions
| Type | Condition |
|---|---|
| AmbiguousMatchException | More than one property is found with the specified name and matching the specified binding constraints. |
| ArgumentNullException |
-or-
-or- One of the elements in |
| ArgumentException |
-or-
-or-
|
| NotSupportedException | The current type is a System.Reflection.Emit.TypeBuilder, System.Reflection.Emit.EnumBuilder, or System.Reflection.Emit.GenericTypeParameterBuilder. |
HasElementTypeImpl()
When overridden in a derived class, implements the System.Type.HasElementType property and determines whether the current System.Type encompasses or refers to another type; that is, whether the current System.Type is an array, a pointer, or is passed by reference.
Declaration
protected override bool HasElementTypeImpl()
Returns
| Type | Description |
|---|---|
| bool | true if the System.Type is an array, a pointer, or is passed by reference; otherwise, false. |
InvokeMember(string, BindingFlags, Binder?, object?, object?[]?, ParameterModifier[]?, CultureInfo?, string[]?)
When overridden in a derived class, invokes the specified member, using the specified binding constraints and matching the specified argument list, modifiers and culture.
Declaration
public override object InvokeMember(string name, BindingFlags invokeAttr, Binder? binder, object? target, object?[]? args, ParameterModifier[]? modifiers, CultureInfo? culture, string[]? namedParameters)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The string containing the name of the constructor, method, property, or field member to invoke. -or- An empty string ("") to invoke the default member. -or- For |
| BindingFlags | invokeAttr | A bitwise combination of the enumeration values that specify how the search is conducted. The access can be one of the |
| Binder | binder | An object that defines a set of properties and enables binding, which can involve selection of an overloaded method, coercion of argument types, and invocation of a member through reflection. -or- A null reference (Nothing in Visual Basic), to use the System.Type.DefaultBinder. Note that explicitly defining a System.Reflection.Binder object may be required for successfully invoking method overloads with variable arguments. |
| object | target | The object on which to invoke the specified member. |
| object[] | args | An array containing the arguments to pass to the member to invoke. |
| ParameterModifier[] | modifiers | An array of System.Reflection.ParameterModifier objects representing the attributes associated with the corresponding element in the The default binder processes this parameter only when calling a COM component. |
| CultureInfo | culture | The System.Globalization.CultureInfo object representing the globalization locale to use, which may be necessary for locale-specific conversions, such as converting a numeric String to a Double. -or- A null reference ( |
| string[] | namedParameters | An array containing the names of the parameters to which the values in the |
Returns
| Type | Description |
|---|---|
| object | An object representing the return value of the invoked member. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException |
|
| ArgumentException |
-or-
-or-
-or-
-or-
-or-
-or-
-or-
-or- The named parameter array is larger than the argument array. -or- This method is called on a COM object and one of the following binding flags was not passed in: -or- One of the named parameter arrays contains a string that is null. |
| MethodAccessException | The specified member is a class initializer. |
| MissingFieldException | The field or property cannot be found. |
| MissingMethodException | No method can be found that matches the arguments in -or- No member can be found that has the argument names supplied in -or- The current System.Type object represents a type that contains open type parameters, that is, System.Type.ContainsGenericParameters returns true. |
| TargetException | The specified member cannot be invoked on |
| AmbiguousMatchException | More than one method matches the binding criteria. |
| InvalidOperationException | The method represented by |
IsArrayImpl()
When overridden in a derived class, implements the System.Type.IsArray property and determines whether the System.Type is an array.
Declaration
protected override bool IsArrayImpl()
Returns
| Type | Description |
|---|---|
| bool |
IsByRefImpl()
When overridden in a derived class, implements the System.Type.IsByRef property and determines whether the System.Type is passed by reference.
Declaration
protected override bool IsByRefImpl()
Returns
| Type | Description |
|---|---|
| bool | true if the System.Type is passed by reference; otherwise, false. |
IsCOMObjectImpl()
When overridden in a derived class, implements the System.Type.IsCOMObject property and determines whether the System.Type is a COM object.
Declaration
protected override bool IsCOMObjectImpl()
Returns
| Type | Description |
|---|---|
| bool |
IsDefined(Type, bool)
When overridden in a derived class, indicates whether one or more attributes of the specified type or of its derived types is applied to this member.
Declaration
public override bool IsDefined(Type attributeType, bool inherit)
Parameters
| Type | Name | Description |
|---|---|---|
| Type | attributeType | The type of custom attribute to search for. The search includes derived types. |
| bool | inherit | true to search this member's inheritance chain to find the attributes; otherwise, false. This parameter is ignored for properties and events. |
Returns
| Type | Description |
|---|---|
| bool | true if one or more instances of |
IsPointerImpl()
When overridden in a derived class, implements the System.Type.IsPointer property and determines whether the System.Type is a pointer.
Declaration
protected override bool IsPointerImpl()
Returns
| Type | Description |
|---|---|
| bool |
IsPrimitiveImpl()
When overridden in a derived class, implements the System.Type.IsPrimitive property and determines whether the System.Type is one of the primitive types.
Declaration
protected override bool IsPrimitiveImpl()
Returns
| Type | Description |
|---|---|
| bool | true if the System.Type is one of the primitive types; otherwise, false. |
MakeArrayType()
Returns a System.Type object representing a one-dimensional array of the current type, with a lower bound of zero.
Declaration
public override Type MakeArrayType()
Returns
| Type | Description |
|---|---|
| Type | A System.Type object representing a one-dimensional array of the current type, with a lower bound of zero. |
Exceptions
| Type | Condition |
|---|---|
| NotSupportedException | The invoked method is not supported in the base class. Derived classes must provide an implementation. |
| TypeLoadException | The current type is System.TypedReference. -or- The current type is a |
Map(Type, Dictionary<string, Type>?)
Gets the actual CLR type by replacing model types, if any.
Declaration
public static Type Map(Type type, Dictionary<string, Type>? modelTypes)
Parameters
| Type | Name | Description |
|---|---|---|
| Type | type | The type. |
| Dictionary<string, Type> | modelTypes | The model types map. |
Returns
| Type | Description |
|---|---|
| Type | The actual CLR type. |
Map(Type, Dictionary<string, Type>?, bool)
Declaration
public static Type Map(Type type, Dictionary<string, Type>? modelTypes, bool dictionaryIsInvariant)
Parameters
| Type | Name | Description |
|---|---|---|
| Type | type | |
| Dictionary<string, Type> | modelTypes | |
| bool | dictionaryIsInvariant |
Returns
| Type | Description |
|---|---|
| Type |
MapToName(Type, Dictionary<string, string>)
Gets the actual CLR type name by replacing model types, if any.
Declaration
public static string MapToName(Type type, Dictionary<string, string> map)
Parameters
| Type | Name | Description |
|---|---|---|
| Type | type | The type. |
| Dictionary<string, string> | map | The model types map. |
Returns
| Type | Description |
|---|---|
| string | The actual CLR type name. |
ToString()
Returns a String representing the name of the current Type.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | A string representing the name of the current System.Type. |