Click or drag to resize

IdentifiedPoolTInstance Class

Keeps track of a pool of identifyable instances.
Inheritance Hierarchy
SystemObject
  SampSharp.GameMode.ToolsDisposable
    SampSharp.GameMode.PoolsIdentifiedPoolTInstance
      More...

Namespace:  SampSharp.GameMode.Pools
Assembly:  SampSharp.GameMode (in SampSharp.GameMode.dll) Version: 0.0.0-localbuild+05637d43e9f34d872e453289d4e240c843e43b09
Syntax
C#
public abstract class IdentifiedPool<TInstance> : Disposable, 
	IIdentifiable
where TInstance : IdentifiedPool<TInstance>

Type Parameters

TInstance
Base type of instances to keep track of.

The IdentifiedPoolTInstance type exposes the following members.

Constructors
  NameDescription
Protected methodIdentifiedPoolTInstance
Initializes a new instance of the IdentifiedPoolTInstance class.
Top
Properties
  NameDescription
Public propertyStatic memberAll
Gets a collection containing all instances.
Public propertyId
Gets the identifier of this instance.
Public propertyStatic memberInstanceType
The type to initialize when adding an instance to this pool by id.
Public propertyIsDisposed
Gets whether this resource has been disposed.
(Inherited from Disposable.)
Top
Methods
  NameDescription
Protected methodAssertNotDisposed
Checks whether this instance has been disposed. If it has, it throws an exception.
(Inherited from Disposable.)
Public methodStatic memberContains
Gets whether the given instance is present in the pool.
Public methodStatic memberCreate
Initializes a new instance with the given id.
Public methodDispose
Performs tasks associated with freeing, releasing, or resetting unmanaged resources.
(Inherited from Disposable.)
Protected methodDispose(Boolean)
Removes this instance from the pool.
(Overrides DisposableDispose(Boolean).)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Finalizes an instance of the Disposable class.
(Inherited from Disposable.)
Public methodStatic memberFind
Finds an instance with the given id.
Public methodStatic memberFindOrCreate
Finds an instance with the given id or initializes a new one.
Public methodStatic memberGetAllT2
Gets a IReadOnlyCollectionT containing all instances of the given type within this IdentifiedPoolTInstance.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodInitialize
An overloadable point for initialization logic which requires the Id to be set.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodStatic memberRegister(Type)
Registers the type to use when initializing new instances.
Public methodStatic memberRegisterTRegister
Registers the type to use when initializing new instances.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Events
  NameDescription
Public eventDisposed
Occurs when this isntance has been disposed.
(Inherited from Disposable.)
Top
See Also
Inheritance Hierarchy