Class SyncHashSet<T>
Inheritance
System.Object
FishNet.Object.Synchronizing.Internal.SyncBase
SyncHashSet<T>
Implements
System.Collections.Generic.ISet<T>
System.Collections.Generic.ICollection<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: FishNet.Runtime.dll
Syntax
[Serializable]
public class SyncHashSet<T> : SyncBase, ISet<T>, ICollection<T>, IEnumerable<T>, IEnumerable
Type Parameters
Constructors
SyncHashSet(SyncTypeSettings)
Declaration
public SyncHashSet(SyncTypeSettings settings = default(SyncTypeSettings))
Parameters
SyncHashSet(HashSet<T>, IEqualityComparer<T>, SyncTypeSettings)
Declaration
public SyncHashSet(HashSet<T> collection, IEqualityComparer<T> comparer = null, SyncTypeSettings settings = default(SyncTypeSettings))
Parameters
Type |
Name |
Description |
System.Collections.Generic.HashSet<T> |
collection |
|
System.Collections.Generic.IEqualityComparer<T> |
comparer |
|
SyncTypeSettings |
settings |
|
SyncHashSet(IEqualityComparer<T>, SyncTypeSettings)
Declaration
public SyncHashSet(IEqualityComparer<T> comparer, SyncTypeSettings settings = default(SyncTypeSettings))
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEqualityComparer<T> |
comparer |
|
SyncTypeSettings |
settings |
|
Fields
Collection
Declaration
public HashSet<T> Collection
Field Value
Type |
Description |
System.Collections.Generic.HashSet<T> |
|
Properties
Count
Number of objects in the collection.
Declaration
public int Count { get; }
Property Value
Type |
Description |
System.Int32 |
|
Methods
Add(T)
Declaration
Parameters
Type |
Name |
Description |
T |
item |
|
Returns
Type |
Description |
System.Boolean |
|
AddRange(IEnumerable<T>)
Declaration
public void AddRange(IEnumerable<T> range)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<T> |
range |
|
Clear()
Declaration
Contains(T)
Declaration
public bool Contains(T item)
Parameters
Type |
Name |
Description |
T |
item |
|
Returns
Type |
Description |
System.Boolean |
|
CopyTo(T[], Int32)
Copies values to an array.
Declaration
public void CopyTo(T[] array, int index)
Parameters
Type |
Name |
Description |
T[] |
array |
|
System.Int32 |
index |
|
Dirty(T)
Looks up obj in Collection and if found marks it's index as dirty.
This operation can be very expensive, will cause allocations, and may fail if your value cannot be compared.
Declaration
Parameters
Type |
Name |
Description |
T |
obj |
Object to lookup.
|
DirtyAll()
Dirties the entire collection forcing a full send.
Declaration
ExceptWith(IEnumerable<T>)
Declaration
public void ExceptWith(IEnumerable<T> other)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<T> |
other |
|
Finalize()
Declaration
protected void Finalize()
GetCollection(Boolean)
Gets the collection being used within this SyncList.
Declaration
public HashSet<T> GetCollection(bool asServer)
Parameters
Type |
Name |
Description |
System.Boolean |
asServer |
|
Returns
Type |
Description |
System.Collections.Generic.HashSet<T> |
|
GetEnumerator()
Returns Enumerator for collection.
Declaration
public IEnumerator GetEnumerator()
Returns
Type |
Description |
System.Collections.IEnumerator |
|
Initialized()
Called when the SyncType has been registered, but not yet initialized over the network.
Declaration
protected override void Initialized()
Overrides
FishNet.Object.Synchronizing.Internal.SyncBase.Initialized()
IntersectWith(IEnumerable<T>)
Declaration
public void IntersectWith(IEnumerable<T> other)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<T> |
other |
|
IsProperSubsetOf(IEnumerable<T>)
Declaration
public bool IsProperSubsetOf(IEnumerable<T> other)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<T> |
other |
|
Returns
Type |
Description |
System.Boolean |
|
IsProperSupersetOf(IEnumerable<T>)
Declaration
public bool IsProperSupersetOf(IEnumerable<T> other)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<T> |
other |
|
Returns
Type |
Description |
System.Boolean |
|
IsSubsetOf(IEnumerable<T>)
Declaration
public bool IsSubsetOf(IEnumerable<T> other)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<T> |
other |
|
Returns
Type |
Description |
System.Boolean |
|
IsSupersetOf(IEnumerable<T>)
Declaration
public bool IsSupersetOf(IEnumerable<T> other)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<T> |
other |
|
Returns
Type |
Description |
System.Boolean |
|
OnStartCallback(Boolean)
Called after OnStartXXXX has occurred.
Declaration
protected override void OnStartCallback(bool asServer)
Parameters
Type |
Name |
Description |
System.Boolean |
asServer |
True if OnStartServer was called, false if OnStartClient.
|
Overrides
FishNet.Object.Synchronizing.Internal.SyncBase.OnStartCallback(System.Boolean)
Overlaps(IEnumerable<T>)
Declaration
public bool Overlaps(IEnumerable<T> other)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<T> |
other |
|
Returns
Type |
Description |
System.Boolean |
|
Remove(T)
Declaration
public bool Remove(T item)
Parameters
Type |
Name |
Description |
T |
item |
|
Returns
Type |
Description |
System.Boolean |
|
ResetState(Boolean)
Resets to initialized values.
Declaration
protected override void ResetState(bool asServer)
Parameters
Type |
Name |
Description |
System.Boolean |
asServer |
|
Overrides
FishNet.Object.Synchronizing.Internal.SyncBase.ResetState(System.Boolean)
SetEquals(IEnumerable<T>)
Declaration
public bool SetEquals(IEnumerable<T> other)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<T> |
other |
|
Returns
Type |
Description |
System.Boolean |
|
SymmetricExceptWith(IEnumerable<T>)
Declaration
public void SymmetricExceptWith(IEnumerable<T> other)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<T> |
other |
|
UnionWith(IEnumerable<T>)
Declaration
public void UnionWith(IEnumerable<T> other)
Parameters
Type |
Name |
Description |
System.Collections.Generic.IEnumerable<T> |
other |
|
WriteDelta(PooledWriter, Boolean)
Writes all changed values.
Declaration
protected override void WriteDelta(PooledWriter writer, bool resetSyncTick = true)
Parameters
Type |
Name |
Description |
PooledWriter |
writer |
|
System.Boolean |
resetSyncTick |
True to set the next time data may sync.
|
Overrides
FishNet.Object.Synchronizing.Internal.SyncBase.WriteDelta(FishNet.Serializing.PooledWriter, System.Boolean)
WriteFull(PooledWriter)
Writes all values if not initial values.
Declaration
protected override void WriteFull(PooledWriter writer)
Parameters
Overrides
FishNet.Object.Synchronizing.Internal.SyncBase.WriteFull(FishNet.Serializing.PooledWriter)
Events
OnChange
Called when the SyncList changes.
Declaration
public event SyncHashSet<T>.SyncHashSetChanged OnChange
Event Type
Type |
Description |
FishNet.Object.Synchronizing.SyncHashSet.SyncHashSetChanged<> |
|
Explicit Interface Implementations
ICollection<T>.Add(T)
Declaration
void ICollection<T>.Add(T item)
Parameters
Type |
Name |
Description |
T |
item |
|
Implements
System.Collections.Generic.ISet<T>
System.Collections.Generic.ICollection<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable
Extension Methods