Vixen
02b45cc4
csharp
public sealed class InspectorMember<TOwner, TValue> where TOwner : class

One member, with the accessors that reach it without boxing.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

Constructed one of two ways. A field gets a MemberReference`2 and can be edited in place, which is what a Vector3 member needs. A property gets a getter and a setter, because there is no reference to take — and a drawer that wants to change one channel of a property-held colour therefore reads, modifies and writes the whole value, which is correct and merely less direct.

⚠ An owner that is not a is a bug in the caller, and it throws rather than returning null. The descriptor was looked up by the object's own type; handing it a different object means two selections got crossed.

Fields and properties (3)

  • public override Type MemberType

    What it holds.

  • public override Type OwnerType

    What it belongs to.

  • public override bool CanWrite

    Whether it can be written at all, condition and read-only flag aside.

Methods (7)

  • public InspectorMember(string name, MemberReference<TOwner, TValue> reference, string? displayName = null)

    Describes a field, reachable by reference.

  • public InspectorMember(string name, Func<TOwner, TValue> getter, Action<TOwner, TValue>? setter, string? displayName = null)

    Describes a property, reachable through accessors.

  • public TValue Get(TOwner owner)

    Reads the member.

  • public void Set(TOwner owner, TValue value)

    Writes the member.

  • public override object? GetBoxed(object owner)

    Reads it, boxing a value type.

  • public override void SetBoxed(object owner, object? value)

    Writes it, unboxing a value type.

  • public override IEditorCommand CreateSetCommand(IReadOnlyList<object> targets, object? value, EditorDocument? document)

    Builds the undoable command that sets this member across a selection.

Used by (42, showing 40)

  • DeclaredContributionTestsVixen.Editor.App.Tests
  • Describes_Vixen_Editor_App_ContentBuildSettingsVixen.Editor.App
  • Describes_Vixen_Editor_App_EditorPreferencesVixen.Editor.App
  • Describes_Vixen_Editor_App_EnvironmentSettingsVixen.Editor.App
  • Describes_Vixen_Editor_App_LightingSettingsVixen.Editor.App
  • Describes_Vixen_Editor_App_NavigationSettingsVixen.Editor.App
  • Describes_Vixen_Editor_App_PhysicsSettingsVixen.Editor.App
  • Describes_Vixen_Editor_App_ProjectAssetVixen.Editor.App
  • Describes_Vixen_Editor_App_ProjectInfoSettingsVixen.Editor.App
  • Describes_Vixen_Editor_App_SceneEntityVixen.Editor.App
  • Describes_Vixen_Editor_App_Tests_PickerFixtureVixen.Editor.App.Tests
  • Describes_Vixen_Editor_AssetEditors_Content_AddressableGroupEditsVixen.Editor.AssetEditors
  • Describes_Vixen_Editor_AssetEditors_Importing_AddressableEditsVixen.Editor.AssetEditors
  • Describes_Vixen_Editor_AssetEditors_Importing_ModelImportEditsVixen.Editor.AssetEditors
  • Describes_Vixen_Editor_AssetEditors_Importing_TextureImportEditsVixen.Editor.AssetEditors
  • Describes_Vixen_Editor_AssetEditors_Materials_ColourParameterVixen.Editor.AssetEditors
  • Describes_Vixen_Editor_AssetEditors_Materials_FlagParameterVixen.Editor.AssetEditors
  • Describes_Vixen_Editor_AssetEditors_Materials_MaterialHeaderEditsVixen.Editor.AssetEditors
  • Describes_Vixen_Editor_AssetEditors_Materials_ScalarParameterVixen.Editor.AssetEditors
  • Describes_Vixen_Editor_AssetEditors_Materials_TextureParameterVixen.Editor.AssetEditors
  • Describes_Vixen_Editor_AssetEditors_Materials_VectorParameterVixen.Editor.AssetEditors
  • Describes_Vixen_Editor_Inspector_Tests_AttributionVixen.Editor.Inspector.Tests
  • Describes_Vixen_Editor_Inspector_Tests_BoundsVixen.Editor.Inspector.Tests
  • Describes_Vixen_Editor_Inspector_Tests_EmitterVixen.Editor.Inspector.Tests
  • Describes_Vixen_Editor_Inspector_Tests_InspectedEntityVixen.Editor.Inspector.Tests
  • Describes_Vixen_Editor_Inspector_Tests_RecursiveVixen.Editor.Inspector.Tests
  • Describes_Vixen_Editor_Inspector_Tests_SparkEmitterVixen.Editor.Inspector.Tests
  • Describes_Vixen_Editor_Inspector_Tests_UncreatableVixen.Editor.Inspector.Tests
  • Describes_Vixen_Editor_Inspector_Tests_VolumeVixen.Editor.Inspector.Tests
  • Describes_Vixen_Editor_Inspector_Tests_WaterMaterialVixen.Editor.Inspector.Tests
  • Describes_Vixen_Editor_Terrain_FoliageSettingsVixen.Editor.Terrain
  • Describes_Vixen_Editor_Terrain_TerrainBrushSettingsVixen.Editor.Terrain
  • Describes_Vixen_Editor_Terrain_TerrainCreateSettingsVixen.Editor.Terrain
  • Describes_Vixen_Editor_Terrain_TerrainGrassSettingsVixen.Editor.Terrain
  • Describes_Vixen_Editor_Terrain_TerrainGrowthSettingsVixen.Editor.Terrain
  • Describes_Vixen_Editor_Terrain_TerrainLayerSettingsVixen.Editor.Terrain
  • Describes_Vixen_Editor_Terrain_TerrainSplineSettingsVixen.Editor.Terrain
  • Describes_Vixen_Editor_Terrain_TerrainToolSettingsVixen.Editor.Terrain
  • DescriptorTestsVixen.Editor.Inspector.Tests
  • OutOfTreePluginTestsVixen.Editor.App.Tests