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-local+709673996c0cc3c0733358a87691d1009326afa7
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 (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 (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodInitialize
An overloadable point for initialization logic which requires the Id to be set.
Protected methodMemberwiseClone (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 (Inherited from Object.)
Top
Events
  NameDescription
Public eventDisposed
Occurs when this isntance has been disposed.
(Inherited from Disposable.)
Top
See Also
Inheritance Hierarchy