Class DbConnectionPool
Inheritance
System.Object
DbConnectionPool
Implements
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: FreeSql.dll
Syntax
public class DbConnectionPool : IObjectPool<DbConnection>, IDisposable
Constructors
|
Improve this Doc
View Source
DbConnectionPool(DataType, Func<DbConnection>)
Declaration
public DbConnectionPool(DataType dataType, Func<DbConnection> connectionFactory)
Parameters
| Type |
Name |
Description |
| DataType |
dataType |
|
| System.Func<System.Data.Common.DbConnection> |
connectionFactory |
|
Properties
|
Improve this Doc
View Source
IsAvailable
Declaration
public bool IsAvailable { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsSingletonConnection
Declaration
public bool IsSingletonConnection { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
Policy
Declaration
public IPolicy<DbConnection> Policy { get; }
Property Value
| Type |
Description |
| IPolicy<System.Data.Common.DbConnection> |
|
|
Improve this Doc
View Source
Statistics
Declaration
public string Statistics { get; }
Property Value
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
StatisticsFullily
Declaration
public string StatisticsFullily { get; }
Property Value
| Type |
Description |
| System.String |
|
|
Improve this Doc
View Source
TestConnection
Declaration
public DbConnection TestConnection { get; }
Property Value
| Type |
Description |
| System.Data.Common.DbConnection |
|
|
Improve this Doc
View Source
UnavailableException
Declaration
public Exception UnavailableException { get; }
Property Value
| Type |
Description |
| System.Exception |
|
|
Improve this Doc
View Source
UnavailableTime
Declaration
public DateTime? UnavailableTime { get; }
Property Value
| Type |
Description |
| System.Nullable<System.DateTime> |
|
Methods
|
Improve this Doc
View Source
Dispose()
Declaration
|
Improve this Doc
View Source
Get(Nullable<TimeSpan>)
Declaration
public Object<DbConnection> Get(TimeSpan? timeout = null)
Parameters
| Type |
Name |
Description |
| System.Nullable<System.TimeSpan> |
timeout |
|
Returns
| Type |
Description |
| Object<System.Data.Common.DbConnection> |
|
|
Improve this Doc
View Source
GetAsync()
Declaration
public async Task<Object<DbConnection>> GetAsync()
Returns
| Type |
Description |
| System.Threading.Tasks.Task<Object<System.Data.Common.DbConnection>> |
|
|
Improve this Doc
View Source
Return(Object<DbConnection>, Boolean)
Declaration
public void Return(Object<DbConnection> obj, bool isReset = false)
Parameters
| Type |
Name |
Description |
| Object<System.Data.Common.DbConnection> |
obj |
|
| System.Boolean |
isReset |
|
|
Improve this Doc
View Source
SetUnavailable(Exception, DateTime)
Declaration
public bool SetUnavailable(Exception exception, DateTime lastGetTime)
Parameters
| Type |
Name |
Description |
| System.Exception |
exception |
|
| System.DateTime |
lastGetTime |
|
Returns
| Type |
Description |
| System.Boolean |
|
Implements
System.IDisposable