Representation of a C#/dotnet type including its inheritance hierarchy. Part of the object model used in the PluginManager
More...
|
Type | Load () |
| Returns the System.Type corresponding to this. If the assembly in which this type is defined has not yet been loaded, this call will load it.
|
|
string | GetBestName () |
| Returns the DisplayAttribute.Name if the type has a DisplayAttribute, otherwise the FullName without namespace More...
|
|
override string | ToString () |
| Creates a string value of this.
|
|
object | CreateInstance (object[] arguments) |
| Creates a new object instance of this type. Accessing this property causes the underlying Assembly to be loaded if it is not already.
|
|
IMemberData | GetMember (string name) |
| Gets a member by name. Causes the underlying Assembly to be loaded if it is not already.
|
|
IEnumerable< IMemberData > | GetMembers () |
| Gets all the members of this type. Causes the underlying Assembly to be loaded if it is not already.
|
|
override bool | Equals (object obj) |
| Compares two TypeDatas by comparing their inner Type instances. More...
|
|
override int | GetHashCode () |
| Calculates the hash code based on the .NET Type instance. More...
|
|
|
string | Name [get] |
| Gets the fully qualified name of the type, including its namespace but not its assembly.
|
|
TypeAttributes | TypeAttributes [get] |
| Gets the TypeAttributes for this type. This can be used to check if the type is abstract, nested, an interface, etc.
|
|
AssemblyData | Assembly [get] |
| Gets the Assembly that defines this type.
|
|
DisplayAttribute | Display [get] |
| Gets.the DisplayAttribute for this type. Null if the type does not have a DisplayAttribute
|
|
IEnumerable< TypeData > | PluginTypes [get] |
| Gets a list of plugin types (i.e. types that directly implement ITapPlugin) that this type inherits from/implements
|
|
IEnumerable< TypeData > | DerivedTypes [get] |
| Gets a list of types that has this type as a base type (including interfaces)
|
|
bool | IsBrowsable [get] |
| False if the type has a System.ComponentModel.BrowsableAttribute with Browsable = false.
|
|
IEnumerable< object > | Attributes [get] |
| The attributes of this type. Accessing this property causes the underlying Assembly to be loaded if it is not already.
|
|
Type | Type [get] |
| Gets the System.Type that this represents. Same as calling Load(). Accessing this property causes the underlying Assembly to be loaded if it is not already.
|
|
bool | IsValueType [get] |
| gets if the type is a value-type. (see Type.IsValueType)
|
|
ITypeData??? | BaseType [get] |
| The base type of this type. Will return null if there is no base type. If there is no direct base, but instead an interface, that will be returned.
|
|
bool | CanCreateInstance [get] |
| returns true if an instance possibly can be created. Accessing this property causes the underlying Assembly to be loaded if it is not already.
|
|
ITypeData | BaseType [get] |
| The base type of this type.
|
|
bool | CanCreateInstance [get] |
| Gets if CreateInstance will work for this type. For examples, for interfaces and abstract classes it will not work.
|
|
IEnumerable< object > | Attributes [get] |
| The attributes of it.
|
|
string | Name [get] |
| The name of it.
|
|
Representation of a C#/dotnet type including its inheritance hierarchy. Part of the object model used in the PluginManager
◆ Equals()
override bool OpenTap.TypeData.Equals |
( |
object |
obj | ) |
|
|
inline |
Compares two TypeDatas by comparing their inner Type instances.
- Parameters
-
- Returns
- true if the two Type properties are equals.
◆ GetBestName()
string OpenTap.TypeData.GetBestName |
( |
| ) |
|
|
inline |
◆ GetDerivedTypes()
Get all known types that derive from a given type.
- Parameters
-
baseType | Base type that all returned types descends to. |
- Returns
- All known types that descends to the given base type.
◆ GetDerivedTypes< BaseType >()
Get all known types that derive from a given type.
- Template Parameters
-
BaseType | Base type that all returned types descends to. |
- Returns
- All known types that descends to the given base type.
◆ GetHashCode()
override int OpenTap.TypeData.GetHashCode |
( |
| ) |
|
|
inline |
Calculates the hash code based on the .NET Type instance.
- Returns
◆ GetTypeDataSource()
Gets the type data source for an ITypeData. For most types this will return the AssemblyData, but for types for which an ITypeDataSourceProvider exists it will return that instead. The base AssemblyData will often be associated to one of the typedatas base classes.
- Parameters
-
- Returns
◆ WithTypeDataCache()
static IDisposable OpenTap.TypeData.WithTypeDataCache |
( |
| ) |
|
|
static |
Creates a type data cache. Note this should be used with 'using{}' so that it gets removed afterwards.
- Returns
- A disposable object removing the cache.