Class PeerCollection
Intern peer dictionary
Implements:
Global.IEqualityComparer<OdinNative.Odin.Peer.Peer>
Properties
this[ulong]
Try to get Peer by id
Count
Count of peers in the collection
IsReadOnly
Indicates whether elements can be added or removed from the collection
Methods
Add(Peer)
Add a peer to the collection
Returns
System.Boolean
: true on success or false
Parameters
Type | Name | Description |
---|---|---|
OdinNative.Odin.Peer.Peer | item | peer to add |
Clear()
Free and empty the collection
Contains(ulong)
Determines whether the peer by id is in the collection
Returns
System.Boolean
: true on success or false
Parameters
Type | Name | Description |
---|---|---|
System.UInt64 | id | peer id of the peer |
Contains(Peer)
Determines whether the peer is in the collection
Returns
System.Boolean
: true on success or false
Parameters
Type | Name | Description |
---|---|---|
OdinNative.Odin.Peer.Peer | item | peer |
CopyTo(Peer[], int)
Copies peers of the collection to an array
Parameters
Type | Name | Description |
---|---|---|
OdinNative.Odin.Peer.Peer[] | array | target array |
System.Int32 | arrayIndex | array offset |
Equals(Peer, Peer)
Determines whether the peers are equal
Returns
System.Boolean
: true if equal or false
Parameters
Type | Name | Description |
---|---|---|
OdinNative.Odin.Peer.Peer | x | peer |
OdinNative.Odin.Peer.Peer | y | peer |
GetEnumerator()
Get enumerator for iteration
Returns
Global.IEnumerator<OdinNative.Odin.Peer.Peer>
: enumerator### GetHashCode(Peer)
Default GetHashCode
Returns
System.Int32
: hash code
Parameters
Type | Name | Description |
---|---|---|
OdinNative.Odin.Peer.Peer | obj | peer |
Remove(ulong)
Remove a peer by id from the collection
Returns
System.Boolean
: true on success or false
Parameters
Type | Name | Description |
---|---|---|
System.UInt64 | id | peer id of the peer to remove |
Remove(Peer)
Remove a peer from the collection
Returns
System.Boolean
: true on success or false
Parameters
Type | Name | Description |
---|---|---|
OdinNative.Odin.Peer.Peer | item | peer to remove |
Implements
Global.IEqualityComparer<OdinNative.Odin.Peer.Peer>