Skip to main content
Version: 2.x

Class RoomCollection

Intern room dictionary

Assembly: cs.temp.dll.dll
Declaration
public class RoomCollection : IReadOnlyCollection<Room>, IEqualityComparer<Room>

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

Properties

this[string]

Try to get room by name

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

this[ulong]

Get room by Id

Declaration
public Room this[ulong id] { 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.Wrapper.Room.Roomitemroom to add

Clear()

Free and empty the collection

Declaration
public void Clear()

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.Wrapper.Room.Roomitemroom

Equals(Room, Room)

Compares two rooms by name

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

System.Boolean: is equal

Parameters
TypeNameDescription
OdinNative.Wrapper.Room.Roomxroom
OdinNative.Wrapper.Room.Roomyroom

GetEnumerator()

Get enumerator for iteration

Declaration
public IEnumerator<Room> GetEnumerator()
Returns

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

Declaration
public int GetHashCode(Room obj)
Returns

System.Int32: hash code

Parameters
TypeNameDescription
OdinNative.Wrapper.Room.Roomobjroom

Remove(ulong)

Removes the room from this collection

Declaration
public bool Remove(ulong id)
Returns

System.Boolean: is removed

Parameters
TypeName
System.UInt64id

Close(Room)

Close a room

Declaration
public bool Close(Room room)
Returns

System.Boolean: true if room to close found

Parameters
TypeNameDescription
OdinNative.Wrapper.Room.Roomroomroom

Close(ulong)

Close a room

Declaration
public bool Close(ulong id)
Returns

System.Boolean: true if room to close found

Parameters
TypeName
System.UInt64id

Implements

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