CapyKit Documentation
  • Introduction
  • Getting Started
  • API Reference
    • CapyKit
      • CapyEventArgs
      • CapyEventHandler
      • CapyEventReporter
      • Color
      • EncryptedValue<T>
      • EventLevel
      • IPasswordAlgorithm
      • NamedColor
      • Password
      • Pbkdf2Algorithm
      • PoolItem<T>
      • Pool<T>
      • PropertyComparer<T, U>
    • CapyKit.Attributes
      • EnumerationAttribute<T>
      • EnumerationDescriptionAttribute
      • ValueFormatAttribute
    • CapyKit.Enumerations
      • MeasurementSystem
    • CapyKit.Extensions
      • EnumerationExtensions
      • LINQExtensions
      • ObjectExtensions
      • StringExtensions
    • CapyKit.Helpers
      • CalculationHelper
      • CompressionHelper
      • EncryptionHelper
      • IEncryptionAlgorithm
      • KeyHelper
      • LanguageHelper
      • SecurityHelper
      • SerializationHelper
      • SettingsHelper
      • ValidCharacterCollection
Search Results for

    Show / Hide Table of Contents
    • Introduction
    • Getting Started
    • API Reference
      • CapyKit
        • CapyEventArgs
        • CapyEventHandler
        • CapyEventReporter
        • Color
        • EncryptedValue<T>
        • EventLevel
        • IPasswordAlgorithm
        • NamedColor
        • Password
        • Pbkdf2Algorithm
        • PoolItem<T>
        • Pool<T>
        • PropertyComparer<T, U>
      • CapyKit.Attributes
        • EnumerationAttribute<T>
        • EnumerationDescriptionAttribute
        • ValueFormatAttribute
      • CapyKit.Enumerations
        • MeasurementSystem
      • CapyKit.Extensions
        • EnumerationExtensions
        • LINQExtensions
        • ObjectExtensions
        • StringExtensions
      • CapyKit.Helpers
        • CalculationHelper
        • CompressionHelper
        • EncryptionHelper
        • IEncryptionAlgorithm
        • KeyHelper
        • LanguageHelper
        • SecurityHelper
        • SerializationHelper
        • SettingsHelper
        • ValidCharacterCollection

    Class PoolItem<T>

    A pool item. This class cannot be inherited.

    Inheritance
    object
    PoolItem<T>
    Namespace: CapyKit
    Assembly: CapyKit.dll
    Syntax
    public sealed class PoolItem<T>
    Type Parameters
    Name Description
    T

    The type of the pooled item.

    Properties

    Index

    Gets the zero-based index of the pooled item.

    Declaration
    public int Index { get; }
    Property Value
    Type Description
    int

    The index.

    Item

    Gets the pooled resource.

    Declaration
    public T Item { get; }
    Property Value
    Type Description
    T

    The pooled resource.

    Locked

    Gets a value indicating whether this object is locked or not.

    Declaration
    public bool Locked { get; }
    Property Value
    Type Description
    bool

    A value indicating whether this object is locked or not.

    TypeName

    Gets the name of the Type of the pooled item.

    Declaration
    public string TypeName { get; }
    Property Value
    Type Description
    string

    The name of the Type of the pooled item.

    Methods

    ReleaseLock()

    Releases the lock on the item.

    Declaration
    public void ReleaseLock()
    Remarks

    If the item is not locked, an error event is emitted.

    SetLock()

    Sets the lock on the item indicating that it is in use.

    Declaration
    public bool SetLock()
    Returns
    Type Description
    bool

    true if the item is locked successfully, false if it fails.

    Remarks

    If the item is already locked, an error event is emitted.

    ToString()

    Returns a string that represents the current object and its lock state.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    A string that represents the current object and its lock state.

    Overrides
    object.ToString()
    In this article
    Back to top Generated by DocFX