using System; using System.Collections; using System.Runtime.CompilerServices; using Robust.Shared.Serialization; namespace Robust.Shared.ViewVariables { /// /// When used as an index in , /// refers to a member (field or property) on the object of the session. /// [Serializable, NetSerializable] public sealed class ViewVariablesMemberSelector { public ViewVariablesMemberSelector(int index) { Index = index; } /// /// The index of the member. These indices assigned by the server-side member trait. /// It's an index instead of a dump string to solve the theoretical case of member hiding. /// public int Index { get; set; } } /// /// When used as an index in , /// refers to an index in the results of a . /// [Serializable, NetSerializable] public sealed class ViewVariablesEnumerableIndexSelector { public ViewVariablesEnumerableIndexSelector(int index) { Index = index; } public int Index { get; set; } } /// /// Used within /// to refer to an index of a tuple. This should match what would be used /// with . /// [Serializable, NetSerializable] public sealed class ViewVariablesTupleIndexSelector(int index) { public int Index { get; set; } = index; } [Serializable, NetSerializable] public sealed class ViewVariablesSelectorKeyValuePair { // If false it's the value instead. public bool Key { get; set; } } }