Click or drag to resize

IdentifiedOwnedPoolTInstance, TOwner Class

Keeps track of a pool of owned and identified instances.
Inheritance Hierarchy

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

Type Parameters

TInstance
Base type of instances to keep track of.
TOwner
Base type of the owner

The IdentifiedOwnedPoolTInstance, TOwner type exposes the following members.

Constructors
  NameDescription
Protected methodIdentifiedOwnedPoolTInstance, TOwner
Initializes a new instance of the IdentifiedOwnedPoolTInstance, TOwner class.
Top
Properties
  NameDescription
Public propertyStatic memberAll
Gets a collection containing all instances.
Public propertyId
Gets the identifier of this instance.
Protected 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.)
Public propertyOwner
Gets the owner of this instance.
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 IdentifiedOwnedPoolTInstance, TOwner.
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 and the Owner to be set.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodStatic memberOf
Gets a collection of instanced owned by the specified owner.
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