Class PooledConnection<TConnection>
Represents a pooled connection with metadata.
public sealed class PooledConnection<TConnection> where TConnection : class
Type Parameters
TConnectionThe type of connection.
- Inheritance
-
PooledConnection<TConnection>
- Inherited Members
- Extension Methods
Properties
Client
Gets or sets the connection instance.
public required TConnection Client { get; set; }
Property Value
- TConnection
The connection instance.
CreatedAt
Gets or sets when the connection was created.
public DateTimeOffset CreatedAt { get; set; }
Property Value
- DateTimeOffset
When the connection was created.
InUse
Gets or sets a value indicating whether the connection is currently in use.
public bool InUse { get; set; }
Property Value
- bool
A value indicating whether the connection is currently in use.
LastUsedAt
Gets or sets when the connection was last used.
public DateTimeOffset LastUsedAt { get; set; }
Property Value
- DateTimeOffset
When the connection was last used.
Metadata
Gets custom metadata associated with the connection.
public Dictionary<string, object> Metadata { get; }
Property Value
- Dictionary<string, object>
Custom metadata associated with the connection.
UseCount
Gets or sets the number of times this connection has been used.
public int UseCount { get; set; }
Property Value
- int
The number of times this connection has been used.