Skip to main content
Version: 1.x

Class RoomCollection

Intern room dictionary

Declaration
public class RoomCollection : IReadOnlyCollection<Room>, IEqualityComparer<Room>

Implements:
Global.IEqualityComparer<OdinNative.Odin.Room.Room>

Properties

this[string]

Try to get room by name

Declaration
public Room this[string key] { get; }

Count

Count of rooms in the collection

Declaration
public int Count { get; }

IsRemoveOnly

Indicates whether elements can be removed from the collection

Declaration
public bool IsRemoveOnly { get; }

Methods

Add(Room)

Add a room to the collection

Declaration
public bool Add(Room item)
Returns

System.Boolean: true on success or false

Parameters
TypeNameDescription
OdinNative.Odin.Room.Roomitemroom to add

Clear()

Free and empty the collection

Declaration
public void Clear()

Contains(string)

Determines whether the room by name/token is in the collection

Declaration
public bool Contains(string key)
Returns

System.Boolean: true on success or false

Parameters
TypeNameDescription
System.Stringkeyroom key of the room

Contains(Room)

Determines whether the room is in the collection

Declaration
public bool Contains(Room item)
Returns

System.Boolean: true on success or false

Parameters
TypeNameDescription
OdinNative.Odin.Room.Roomitemroom

CopyTo(Room[], int)

Copies rooms of the collection to an array

Declaration
public void CopyTo(Room[] array, int arrayIndex)
Parameters
TypeNameDescription
OdinNative.Odin.Room.Room[]arraytarget array
System.Int32arrayIndexarray offset

Equals(Room, Room)

Compares two rooms by name

Declaration
public bool Equals(Room x, Room y)
Returns

System.Boolean: is equal

Parameters
TypeNameDescription
OdinNative.Odin.Room.Roomxroom
OdinNative.Odin.Room.Roomyroom

GetEnumerator()

Get enumerator for iteration

Declaration
public IEnumerator<Room> GetEnumerator()
Returns

Global.IEnumerator<OdinNative.Odin.Room.Room>: enumerator### GetHashCode(Room) Default GetHashCode

Declaration
public int GetHashCode(Room obj)
Returns

System.Int32: hash code

Parameters
TypeNameDescription
OdinNative.Odin.Room.Roomobjroom

Remove(string)

Removes the room from this collection

Declaration
public bool Remove(string key)
Returns

System.Boolean: is removed

Parameters
TypeNameDescription
System.StringkeyRoom name

Remove(Room)

Removes the room from this collection

Declaration
public bool Remove(Room item)
Returns

System.Boolean: is removed

Parameters
TypeNameDescription
OdinNative.Odin.Room.Roomitemroom

Leave(string)

Get the room and leave

Declaration
public void Leave(string key)
Parameters
TypeNameDescription
System.Stringkeyroom name

Implements

  • Global.IEqualityComparer<OdinNative.Odin.Room.Room>