Persistate API documentation
ResourceSlotSet<(Of <(<'T>)>)> Structure
NamespacesPersistate.UtilResourceSlotSet<(Of <(<'T>)>)>

[This is preliminary documentation and is subject to change.]

Implements storage for a resizable set of resource slots.
Declaration Syntax
C#
public struct ResourceSlotSet<T>
where T : class
Generic Template Parameters
T
The type of resource that can be contained in the ResourceSlotSet. This must be a class type.
Members
All MembersConstructorsMethodsProperties



IconMemberDescription
ResourceSlotSet<(Of <(<'T>)>)>(Int32)
Initialises the ResourceSlotSet<(Of <(<'T>)>)> with a particular initial capacity.

Add(T)
Adds a T resource to the set.

Capacity
Gets the current capacity of the ResourceSlotSet<(Of <(<'T>)>)>.

Count
Gets the number of resources in the set.

Equals(Object)
Indicates whether this instance and a specified object are equal.
(Inherited from ValueType.)
Finalize()()()()
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
GetHashCode()()()()
Returns the hash code for this instance.
(Inherited from ValueType.)
GetType()()()()
Gets the Type of the current instance.
(Inherited from Object.)
Item[([( Int32])])
Obtains the T resource at a particular slot in the set.

MemberwiseClone()()()()
Creates a shallow copy of the current Object.
(Inherited from Object.)
Remove(Int32)
Removes a T resource from a particular slot in the set.

Resources
Gets a collection containing the resources in the set.

SlotOf(T)
Finds the slot containing a particular resource.

ToString()()()()
Returns the fully qualified type name of this instance.
(Inherited from ValueType.)
Remarks

You can add and remove resources from the set. The capacity of the set is increased as necessary, but never decreased. When you add a resource, a slot is returned which is used thereafter to access and remove the resource. When you remove a resource, the slot is reused for subsequent additions.

You must initialise a ResourceSlotSet with the one parameter constructor, otherwise an exception will be thrown when you call any of the methods.

This struct is thread safe.

Assembly: Persistate.Util (Module: Persistate.Util) Version: 0.6.1.20 (0.6.1.20)