MagicPool 1.3.0
dotnet add package MagicPool --version 1.3.0
NuGet\Install-Package MagicPool -Version 1.3.0
<PackageReference Include="MagicPool" Version="1.3.0" />
<PackageVersion Include="MagicPool" Version="1.3.0" />
<PackageReference Include="MagicPool" />
paket add MagicPool --version 1.3.0
#r "nuget: MagicPool, 1.3.0"
#:package MagicPool@1.3.0
#addin nuget:?package=MagicPool&version=1.3.0
#tool nuget:?package=MagicPool&version=1.3.0
how to use? only two line of code :
Pools p = new Pools(10);
var res = p.Instance<SqlConnection>();
then you get a SqlConnecation instance.
return a instance :
p.Return<SqlConnection>(res);
it's just so easy.
Want init object automicly?
pay attention to class InstancePool<T>, this privide external delaget to init,pretratment,reset (in this case the instance is not you write ).
another way, pay attention to the interface IReusable , impl this will let the instance pool automic do something to the instance that you want to do.(this suit for the case that you need write class by your self).
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|
add the .netcore spport ,optimized code,add GetPool method for class Pools