MetaType contains metadata about a type. This is used by the reflection
serializer.
Fields
Declaration
public Type ReflectedType
Field Value
Properties
Returns true if the type represented by this metadata contains a
default constructor.
Declaration
public bool HasDefaultConstructor { get; }
Property Value
Declaration
public fsMetaProperty[] Properties { get; }
Property Value
Methods
Clears out the cached type results. Useful if some prior assumptions
become invalid, ie, the default member serialization mode.
Declaration
public static void ClearCache()
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
Attempt to emit an AOT compiled direct converter for this type.
Declaration
public bool EmitAotData()
Returns
Type |
Description |
Boolean |
True if AOT data was emitted, false otherwise.
|
Declaration
public static fsMetaType Get(fsConfig config, Type type)
Parameters
Returns
Extension Methods