UtilPack.ResourcePooling.MSBuild
1.0.0
dotnet add package UtilPack.ResourcePooling.MSBuild --version 1.0.0
NuGet\Install-Package UtilPack.ResourcePooling.MSBuild -Version 1.0.0
<PackageReference Include="UtilPack.ResourcePooling.MSBuild" Version="1.0.0" />
paket add UtilPack.ResourcePooling.MSBuild --version 1.0.0
#r "nuget: UtilPack.ResourcePooling.MSBuild, 1.0.0"
// Install UtilPack.ResourcePooling.MSBuild as a Cake Addin #addin nuget:?package=UtilPack.ResourcePooling.MSBuild&version=1.0.0 // Install UtilPack.ResourcePooling.MSBuild as a Cake Tool #tool nuget:?package=UtilPack.ResourcePooling.MSBuild&version=1.0.0
UtilPack.ResourcePooling.MSBuild
Acting as a bridge between UtilPack.ResourcePooling project and MSBuild world, this project provides only one type, AbstractResourceUsingTask
.
This type should be extended by MSBuild custom tasks, which intend to use the UtilPack.ResourcePooling project to deliver their functionality.
One such example of task is a task which dumps the contents of SQL file into the database.
The AbstractResourceUsingTask
class implements canceability fully, and leaves two abstract methods for derived classes to implement.
Most of other methods are virtual, allowing derived classes to override them.
Abstract methods
CheckTaskParametersBeforeResourcePoolUsage
This method is used as a sanity check before actually starting to search for AsyncResourceFactoryProvider
type from UtilPack.ResourcePooling project.
The SQL dump running task could here e.g. check whether file exists.
UseResource
This method should perform the actual domain-specific functionality, using the resource it receives as parameter.
The SQL dump running task would here read the SQL statements from file and execute them using the resource (which would be of type SQLConnection
).
Parameters
The AbstractResourceUsingTask
introduces a number of task parameters, none of them statically marked as required, since most of the implementation can be overridden.
However, the default implementation, unless overridden, requires the following parameters:
PoolProviderPackageID
of typeString
: should specify the NuGet package ID of the package holding type implementing theAsyncResourceFactoryProvider
type from UtilPack.ResourcePooling project.PoolConfigurationFileContents
of typeString
: sometimes it is more conventient to give configuration file contents directly, then this property should be used. This property takes precedence overPoolConfigurationFilePath
.PoolConfigurationFilePath
of typeString
: should specify the path to JSON file containing serialized configuration for object passed as parameter toCreateOneTimeUseResourcePool
method ofAsyncResourceFactoryProvider
type from UtilPack.ResourcePooling project. The Microsoft.Extensions.Configuration.Json package will be used to deserialize the value.
The default implementation, unless overridden, has the following optional parameters:
PoolProviderVersion
of typeString
: the version part paired withPoolProviderPackageID
, should specify the version of the NuGet package holding type implementingAsyncResourceFactoryProvider
type from UtilPack.ResourcePooling project. If not specified, newest version will be used.PoolProviderAssemblyPath
of typeString
: the path within the NuGet package specified byPoolProviderPackageID
andPoolProviderVersion
parameters, where the assembly holding type implementingAsyncResourceFactoryProvider
type from UtilPack.ResourcePooling project resides. Is used only for NuGet packages with more than one assembly in their framework-specific folder.PoolProviderTypeName
of typeString
: once the assembly is loaded usingPoolProviderPackageID
,PoolProviderVersion
andPoolProviderAssemblyPath
parameters, this parameter may be used to specify the name of the type implementingAsyncResourceFactoryProvider
type from UtilPack.ResourcePooling project. If left out, the first suitable type from all types defined in the assembly will be used.RunSynchronously
of typeBoolean
: this is infrastructure-related parameter, and actually is always used, since the usage is in non-virtual method. This parameter, iftrue
, will skip calling Yield method.
Distribution
The NuGet package has the same package ID as this folder name. The task provided by this project should be loaded using UtilPack.NuGet.MSBuild task factory.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp1.0 was computed. netcoreapp1.1 was computed. netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard1.3 is compatible. netstandard1.4 was computed. netstandard1.5 was computed. netstandard1.6 was computed. netstandard2.0 was computed. netstandard2.1 was computed. |
.NET Framework | net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen30 was computed. tizen40 was computed. tizen60 was computed. |
Universal Windows Platform | uap was computed. uap10.0 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 1.3
- Microsoft.Build.Utilities.Core (>= 15.1.1012)
- Microsoft.Extensions.Configuration.Binder (>= 1.1.2)
- Microsoft.Extensions.Configuration.Json (>= 1.1.2)
- NETStandard.Library (>= 1.6.1)
- UtilPack.ResourcePooling (>= 1.0.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on UtilPack.ResourcePooling.MSBuild:
Package | Downloads |
---|---|
CBAM.SQL.MSBuild
The Connection-Based Asynchronous Messaging (CBAM) SQL.MSbuild assembly contains abstract SQL-oriented MSBuild task, and task which reads file and executes SQL statements contained within. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Added property for specifying configuration file contents directly as string.