Class fsMetaProperty
A property or field on a MetaType. This unifies the FieldInfo and PropertyInfo classes.
Namespace: Unity.VisualScripting.FullSerializer
Syntax
public class fsMetaProperty
Properties
CanRead
Can this property be read?
Declaration
public bool CanRead { get; }
Property Value
Type | Description |
---|---|
Boolean |
CanWrite
Can this property be written to?
Declaration
public bool CanWrite { get; }
Property Value
Type | Description |
---|---|
Boolean |
IsPublic
Is this member public?
Declaration
public bool IsPublic { get; }
Property Value
Type | Description |
---|---|
Boolean |
IsReadOnly
Is this type readonly? We can modify readonly properties using reflection, but not using generated C#.
Declaration
public bool IsReadOnly { get; }
Property Value
Type | Description |
---|---|
Boolean |
JsonName
The serialized name of the property, as it should appear in JSON.
Declaration
public string JsonName { get; }
Property Value
Type | Description |
---|---|
String |
MemberName
The name of the actual member.
Declaration
public string MemberName { get; }
Property Value
Type | Description |
---|---|
String |
OverrideConverterType
A custom fsBaseConverter instance to use for this field/property, if requested. This will be null if the default converter selection algorithm should be used. This is specified using the [fsObject] annotation with the Converter field.
Declaration
public Type OverrideConverterType { get; }
Property Value
Type | Description |
---|---|
Type |
StorageType
The type of value that is stored inside of the property. For example, for an int field, StorageType will be typeof(int).
Declaration
public Type StorageType { get; }
Property Value
Type | Description |
---|---|
Type |
Methods
Read(Object)
Reads a value from the property that this MetaProperty represents, using the given object instance as the context.
Declaration
public object Read(object context)
Parameters
Type | Name | Description |
---|---|---|
Object | context |
Returns
Type | Description |
---|---|
Object |
Write(Object, Object)
Writes a value to the property that this MetaProperty represents, using given object instance as the context.
Declaration
public void Write(object context, object value)
Parameters
Type | Name | Description |
---|---|---|
Object | context | |
Object | value |