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
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="UtilPack.ResourcePooling.MSBuild" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add UtilPack.ResourcePooling.MSBuild --version 1.0.0
#r "nuget: UtilPack.ResourcePooling.MSBuild, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// 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 type String: should specify the NuGet package ID of the package holding type implementing the AsyncResourceFactoryProvider type from UtilPack.ResourcePooling project.
  • PoolConfigurationFileContents of type String: sometimes it is more conventient to give configuration file contents directly, then this property should be used. This property takes precedence over PoolConfigurationFilePath.
  • PoolConfigurationFilePath of type String: should specify the path to JSON file containing serialized configuration for object passed as parameter to CreateOneTimeUseResourcePool method of AsyncResourceFactoryProvider 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 type String: the version part paired with PoolProviderPackageID, should specify the version of the NuGet package holding type implementing AsyncResourceFactoryProvider type from UtilPack.ResourcePooling project. If not specified, newest version will be used.
  • PoolProviderAssemblyPath of type String: the path within the NuGet package specified by PoolProviderPackageID and PoolProviderVersion parameters, where the assembly holding type implementing AsyncResourceFactoryProvider type from UtilPack.ResourcePooling project resides. Is used only for NuGet packages with more than one assembly in their framework-specific folder.
  • PoolProviderTypeName of type String: once the assembly is loaded using PoolProviderPackageID, PoolProviderVersion and PoolProviderAssemblyPath parameters, this parameter may be used to specify the name of the type implementing AsyncResourceFactoryProvider type from UtilPack.ResourcePooling project. If left out, the first suitable type from all types defined in the assembly will be used.
  • RunSynchronously of type Boolean: this is infrastructure-related parameter, and actually is always used, since the usage is in non-virtual method. This parameter, if true, 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.

Version Downloads Last updated
1.0.0 2,325 5/26/2018
1.0.0-RC4 1,495 10/18/2017
1.0.0-RC3 1,461 9/21/2017
1.0.0-RC2 1,225 9/21/2017
1.0.0-RC1 1,455 9/4/2017

Added property for specifying configuration file contents directly as string.