Version 3.3.1.2

PropertyValueCollection class

Namespace: Sirenix.OdinInspector.Editor
Assembly: Sirenix.OdinInspector.Editor
public abstract class PropertyValueCollection : IPropertyValueCollection, IList, ICollection, IEnumerable
Represents a weakly typed collection of values for a PropertyValueEntry - one value per selected inspector target.
Inheritance
  • System.Object
  • PropertyValueCollection

Constructors

PropertyValueCollection(InspectorProperty)
Initializes a new instance of the PropertyValueCollection class.
protected PropertyValueCollection(InspectorProperty property)
Parameters
InspectorProperty property

The property to represent.

Exceptions
System.ArgumentNullException

property is null

Fields

Property
The property whose values are represented.
protected readonly InspectorProperty Property

Properties

AreDirty
Whether the values have been changed since MarkClean() was last called.
public abstract bool AreDirty { get; }
Count
The number of values in the collection.
public abstract int Count { get; }
IsSynchronized
Gets a value indicating whether this instance is synchronized.
protected abstract bool IsSynchronized { get; }
Item[Int32]
Gets or sets the weakly typed System.Object at the specified index.
public object this[int index] { get; set; }
Parameters
System.Int32 index

The index to set.

SyncRoot
Gets the synchronization root object.
protected abstract object SyncRoot { get; }
WeakOriginal
The original values of the (loosely typed) value collection, such as they were immediately after the last Update() call.
protected abstract IImmutableList WeakOriginal { get; }

Methods

Contains(Object)
Determines whether the collection contains the specified value.
protected abstract bool Contains(object value)
Parameters
System.Object value

The value.

Returns
System.Boolean

true if the collection contains the specified value; otherwise, false.

CopyTo(Array, Int32)
Copies the collection to an array.
protected abstract void CopyTo(Array array, int index)
Parameters
System.Array array

The array to copy to.

System.Int32 index

The index to copy from.

ForceMarkDirty()
Marks the value collection as being dirty, regardless of any value changes.
public abstract void ForceMarkDirty()
ForceSetValue(Int32, Object)

Force sets the value, ignoring whether it is editable or not.

Note that this will fail on list element value entries where is true on the parent value entry.

public abstract void ForceSetValue(int index, object value)
Parameters
System.Int32 index

The selection index of the value.

System.Object value

The value to be set.

GetEnumerator()
Gets an enumerator for the collection.
public abstract IEnumerator GetEnumerator()
Returns
System.Collections.IEnumerator

GetWeakValue(Int32)
Gets the weakly typed value at the given index.
protected abstract object GetWeakValue(int index)
Parameters
System.Int32 index

The index of the value to get.

Returns
System.Object

The weakly typed value at the given index

IndexOf(Object)
Gets the index of the given value, or -1 if the value was not found.
protected abstract int IndexOf(object value)
Parameters
System.Object value

The value to get the index of.

Returns
System.Int32

The index of the given value, or -1 if the value was not found.

MarkClean()
Marks the value collection as being clean again. This is typically called at the end of the current GUI frame, during ApplyChanges().
public abstract void MarkClean()
RevertUnappliedValues()
Reverts the value collection to its origin values (found in ) from the last Update() call, and marks the value collection as being clean again.
public abstract void RevertUnappliedValues()
SetWeakValue(Int32, Object)
Sets the weakly typed value at the given index.
protected abstract void SetWeakValue(int index, object value)
Parameters
System.Int32 index

The index to set the value of.

System.Object value

The value to set.

Extension Methods