Class fsMetaProperty
A property or field on a MetaType. This unifies the FieldInfo and PropertyInfo classes.
Inherited Members
Namespace: Unity.VisualScripting .FullSerializer
Assembly: Unity.VisualScripting.Core.dll
Syntax
public class fsMetaProperty
Properties
CanRead
Can this property be read?
Declaration
public bool CanRead { get; }
Property Value
Type | Description |
---|---|
bool |
CanWrite
Can this property be written to?
Declaration
public bool CanWrite { get; }
Property Value
Type | Description |
---|---|
bool |
IsPublic
Is this member public?
Declaration
public bool IsPublic { get; }
Property Value
Type | Description |
---|---|
bool |
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 |
---|---|
bool |
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)