Class fsMetaType
MetaType contains metadata about a type. This is used by the reflection serializer.
Inheritance
object
fsMetaType
Namespace: Unity.VisualScripting.FullSerializer
Assembly: solution.dll
Syntax
public class fsMetaType
Fields
ReflectedType
Declaration
public Type ReflectedType
Field Value
| Type | Description |
|---|---|
| Type |
Properties
HasDefaultConstructor
Returns true if the type represented by this metadata contains a default constructor.
Declaration
public bool HasDefaultConstructor { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Properties
Declaration
public fsMetaProperty[] Properties { get; }
Property Value
| Type | Description |
|---|---|
| fsMetaProperty[] |
Methods
ClearCache()
Clears out the cached type results. Useful if some prior assumptions become invalid, ie, the default member serialization mode.
Declaration
public static void ClearCache()
CreateInstance()
Creates a new instance of the type that this metadata points back to. If this type has a default constructor, then Activator.CreateInstance will be used to construct the type (or Array.CreateInstance if it an array). Otherwise, an uninitialized object created via FormatterServices.GetSafeUninitializedObject is used to construct the instance.
Declaration
public object CreateInstance()
Returns
| Type | Description |
|---|---|
| object |
EmitAotData()
Attempt to emit an AOT compiled direct converter for this type.
Declaration
public bool EmitAotData()
Returns
| Type | Description |
|---|---|
| bool | True if AOT data was emitted, false otherwise. |
Get(fsConfig, Type)
Declaration
public static fsMetaType Get(fsConfig config, Type type)
Parameters
| Type | Name | Description |
|---|---|---|
| fsConfig | config | |
| Type | type |
Returns
| Type | Description |
|---|---|
| fsMetaType |