Skip to main content
Version: 2.x

Class RoomCollection

Intern room dictionary

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

Implements:
System.Collections.Generic.IReadOnlyCollection<OdinNative.Wrapper.Room.Room> , System.Collections.Generic.IEnumerable<OdinNative.Wrapper.Room.Room> , System.Collections.IEnumerable , System.Collections.Generic.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 hash code

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​

System.Collections.Generic.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​
TypeNameDescription
System.UInt64idroom id OdinNative.Wrapper.Room.Room.GetRoomId()

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​

  • System.Collections.Generic.IReadOnlyCollection<OdinNative.Wrapper.Room.Room>
  • System.Collections.Generic.IEnumerable<OdinNative.Wrapper.Room.Room>
  • System.Collections.IEnumerable
  • System.Collections.Generic.IEqualityComparer<OdinNative.Wrapper.Room.Room>