public sealed class MemberDescriptorOne member of a described type, and the two delegates that read and write it.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
The accessors are generated lambdas — static instance => ((Foo)instance).X — not PropertyInfo calls. That is the entire point of this assembly: an inspector, a serializer fallback and a diff tool can all read and write arbitrary members on a platform where System.Reflection's member access has been trimmed away.
They pass values as Object, which boxes a struct. That is deliberate and it is why this is not a frame-loop API: it exists for tooling, inspection and boot-time discovery, where one allocation per property read is invisible. Frame code uses the generated serializer or touches the field directly.
Fields and properties (7)
public string NameThe member's name in source.
public Type MemberTypeWhat it holds.
public int OrderWhere it sits in the type's declared order.
public MemberPresentation PresentationHow it should be presented.
public bool CanWriteWhether it can be written at all.
public bool IsInitOnlyWhether it is init-only — settable, but only meant to be set once.
public bool IsSerializedWhether the member is part of the type's data, or only of its API.
Methods (4)
public MemberDescriptor(string name, Type memberType, int order, Func<object, object?>? getter, Action<object, object?>? setter, MemberPresentation presentation = default(MemberPresentation), bool isInitOnly = false, bool isSerialized = true)Describes a member.
public object? GetValue(object instance)Reads the member.
public void SetValue(object instance, object? value)Writes the member.
public override string ToString()Renders the member as Name : Type.
Used by (14)
- MaterialHelloUi
- NestedMemberTestsVixen.Ui.Controls.Advanced.Tests
- PropertyGridVixen.Ui.Controls.Advanced
- PropertyGridTestsVixen.Ui.Controls.Advanced.Tests
- PropertyRowVixen.Ui.Controls.Advanced
- SplineAssetTestsVixen.Core.Mathematics.Tests
- TypeDescriptorVixen.Core.Reflection
- TypeRegistryTestsVixen.Core.Reflection.Tests
- YamlSerializerVixen.Core.Yaml
- EditorScriptTestsVixen.Editor.Scripts.Tests
- ReflectedDescriptorVixen.Editor.Inspector
- ReflectedMemberVixen.Editor.Inspector
- ReflectedTypeTestsVixen.Editor.Scripts.Tests
- ReflectedTypesVixen.Editor.Scripts