ProductivityExtensionMethods 1.0.0-beta.7
dotnet add package ProductivityExtensionMethods --version 1.0.0-beta.7
NuGet\Install-Package ProductivityExtensionMethods -Version 1.0.0-beta.7
<PackageReference Include="ProductivityExtensionMethods" Version="1.0.0-beta.7" />
paket add ProductivityExtensionMethods --version 1.0.0-beta.7
#r "nuget: ProductivityExtensionMethods, 1.0.0-beta.7"
// Install ProductivityExtensionMethods as a Cake Addin
#addin nuget:?package=ProductivityExtensionMethods&version=1.0.0-beta.7&prerelease
// Install ProductivityExtensionMethods as a Cake Tool
#tool nuget:?package=ProductivityExtensionMethods&version=1.0.0-beta.7&prerelease
How to use
After referencing the package, a T4 Template file is created in your project that will generate a C# .cs file. Modify top section of the file to enable certain category of extension methods. Nuget will take care of future updates.
Visit FAQ page for more details.
Important Notes
- If updating, make sure to open the ProductivityExtension.tt file and save to re-generate code.
- The generated code works in C# projects only.
- The C# code contains C# 7.3 syntax in some categories. Make sure it is enabled in your project by going to Project Properties → Build → Advanced...
- The C# code contains Nullable Reference Type feature available in C# 8. It will only be generated if target framework is compatible with .Net Standard 2.1 and above.
- It is tested on latest versions of Visual Studio 2019/2017.
Known Issues
- If the nuget package is removed for any reason then immediately added back, no .tt file will be added to the project. This is a bug in Visual Studio/Nuget. The initialization script for the nuget package is not run the second time until Visual Studio is restarted.
- If package is added to one project, then immediately to another, the second project doesn't get the .tt file. This is due to the same bug as above and VS should be restarted between adds.
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.1
- 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 | |
---|---|---|---|
1.0.0-beta.7 | 629 | 2/21/2020 | |
1.0.0-beta.6 | 252 | 12/8/2019 | |
1.0.0-beta.5 | 275 | 11/24/2019 | |
1.0.0-beta.4 | 281 | 10/11/2019 | |
1.0.0-beta.3 | 369 | 10/11/2019 | |
1.0.0-beta.2 | 372 | 10/9/2019 | |
1.0.0-beta.1 | 380 | 10/8/2019 |
- Configurable namespace for the generated code, giving more flexibility to prevent collision when package is added to more than one referenced assembly.
- Extension methods are now in global root namespace by default, eliminating the need to include usings.
- Max and Min method for IComparable category
- PickFirst, Flatten and AreAllEqual methods in IEnumerable category, with proper array overloads.
- Ensuring that all overloads that accept comparer delegate also have an overload that accept hash calculator delegate for performance improvement for large object comparisons.
- ADO.net extensions category is dropped.
- Overall bug fixes and refactoring of the extension methods.