CommonNetFuncs.Core
3.2.1
See the version list below for details.
dotnet add package CommonNetFuncs.Core --version 3.2.1
NuGet\Install-Package CommonNetFuncs.Core -Version 3.2.1
<PackageReference Include="CommonNetFuncs.Core" Version="3.2.1" />
<PackageVersion Include="CommonNetFuncs.Core" Version="3.2.1" />
<PackageReference Include="CommonNetFuncs.Core" />
paket add CommonNetFuncs.Core --version 3.2.1
#r "nuget: CommonNetFuncs.Core, 3.2.1"
#:package CommonNetFuncs.Core@3.2.1
#addin nuget:?package=CommonNetFuncs.Core&version=3.2.1
#tool nuget:?package=CommonNetFuncs.Core&version=3.2.1
CommonNetFuncs.Core
This lightweight project contains helper methods for several common functions required by applications.
Contents
- Async
- Collections
- Copy
- DateOnlyHelpers
- DateTimeHelpers
- DimensionScale
- ExceptionLocation
- FileHelpers
- Inspect
- MathHelpers
- Random
- RunBatches
- Streams
- Strings
- TypeChecks
- UnitConversion
Async
Helper methods for dealing with asynchronous processes. <details> <summary><h3>Usage Examples</h3></summary>
ObjectUpdate
Asynchronously update properties of a class using ObjectUpdate
//Fill the Name and Address property using async tasks
Person person = new();
//AsyncIntString helper class is used for int and string types since they can't otherwise be gotten asynchronously like this
AsyncIntString personPhotoLocation = new();
person.Id = 1;
List<Task> tasks =
[
person.ObjectUpdate(nameof(Person.Name), GetPersonNameByIdAsync(person.Id)), //Fills person.Name with results of GetPersonNameByIdAsync(person.Id)
person.ObjectUpdate(nameof(Person.Address), GetPersonAddressByIdAsync(person.Id)), //Fills person.Address with results of GetPersonAddressByIdAsync(person.Id)
personPhotoLocation.ObjectUpdate(nameof(AsyncIntString.AsyncString), GetPersonPhotoLocationById(person.Id)) //Fills personPhotoLocation.AsyncString with the results of GetPersonPhotoLocationById(person.Id)
]
await Task.WhenAll(tasks);
ObjectFill
Object fill can be used to asynchronously fill classes and lists with.
Person person = new();
ConcurrentBag<Person> people = [];
List<Task> tasks =
[
person.ObjectUpdate(GetPersonById(1)), //person is filled by results of GetPersonById(1) which returns type Person
//people is filled by the results of all three calls to GetPeopleByState additively (all results will be present in people)
people.ObjectUpdate(GetPeopleByState("Ohio")),
people.ObjectUpdate(GetPeopleByState("California")),
people.ObjectUpdate(GetPeopleByState("Texas"))
]
await Task.WhenAll(tasks);
</details>
Collections
Collections Usage Examples
Helper methods that work with collections such as IEnumerable, List, IDictionary, ConcurrentBag, and DataTable
<details> <summary><h3>Usage Examples</h3></summary>
AnyFast
Used to address issue CA1860 where it suggests using .Count for performance in an easier to type extension method
bool x = collection?.Any() == true;
//Or
collection?.Count > 0;
//Becomes
bool x = collection.AnyFast();
AddDictionaryItem & AddDictionaryItems
Used to directly TryAdd a KeyValuePair object(s) to a dictionary
KeyValuePair<string, string> JsonContentHeader = new("Content-Type", "application/json");
//Single addition
ConcurrentDictionary<string, string>? httpHeaders = [];
httpHeaders.AddDictionaryItem(JsonContentHeader);
//Add multiples
List<KeyValuePair<string, string>> keyValuePairs = [new("Accept-Encoding", "br"), new("Accept-Encoding", "gzip")];
httpHeaders.AddDictionaryItems(keyValuePairs);
AddRange & AddRangeParallel
[Description]
SetValue & SetValueParallel
[Description]
SelectNonEmpty
[Description]
SelectNonNull
[Description]
SingleToList
[Description]
GetObjectByPartial
[Description]
ToList
[Description]
ToListParallel
[Description]
ToDataTable
[Description]
ToDataTableReflection
[Description]
CombineExpressions
[Description]
StringAggProps
[Description]
IndexOf
[Description]
</details>
Copy
Copy Usage Examples
[Description here]
<details> <summary><h3>Usage Examples</h3></summary>
[MethodNameHere]
//Code here
</details>
DateOnlyHelpers
DateHelpers Usage Examples
[Description here]
<details> <summary><h3>Usage Examples</h3></summary>
[MethodNameHere]
//Code here
</details>
DateTimeHelpers
DateHelpers Usage Examples
[Description here]
<details> <summary><h3>Usage Examples</h3></summary>
[MethodNameHere]
//Code here
</details>
DimensionScale
DimensionScale Usage Examples
[Description here]
<details> <summary><h3>Usage Examples</h3></summary>
[MethodNameHere]
//Code here
</details>
ExceptionLocation
ExceptionLocation Usage Examples
[Description here]
<details> <summary><h3>Usage Examples</h3></summary>
[MethodNameHere]
//Code here
</details>
FileHelpers
FileHelpers Usage Examples
[Description here]
<details> <summary><h3>Usage Examples</h3></summary>
[MethodNameHere]
//Code here
</details>
Inspect
Inspect Usage Examples
[Description here]
<details> <summary><h3>Usage Examples</h3></summary>
[MethodNameHere]
//Code here
</details>
MathHelpers
MathHelpers Usage Examples
[Description here]
<details> <summary><h3>Usage Examples</h3></summary>
[MethodNameHere]
//Code here
</details>
Random
Random Usage Examples
[Description here]
<details> <summary><h3>Usage Examples</h3></summary>
[MethodNameHere]
//Code here
</details>
RunBatches
RunBatches Usage Examples
[Description here]
<details> <summary><h3>Usage Examples</h3></summary>
[MethodNameHere]
//Code here
</details>
Streams
Streams Usage Examples
[Description here]
<details> <summary><h3>Usage Examples</h3></summary>
[MethodNameHere]
//Code here
</details>
Strings
Strings Usage Examples
[Description here]
<details> <summary><h3>Usage Examples</h3></summary>
[MethodNameHere]
//Code here
</details>
TypeChecks
TypeChecks Usage Examples
[Description here]
<details> <summary><h3>Usage Examples</h3></summary>
[MethodNameHere]
//Code here
</details>
UnitConversion
UnitConversion Usage Examples
[Description here]
<details> <summary><h3>Usage Examples</h3></summary>
[MethodNameHere]
//Code here
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net9.0
- No dependencies.
NuGet packages (16)
Showing the top 5 NuGet packages that depend on CommonNetFuncs.Core:
| Package | Downloads |
|---|---|
|
CommonNetFuncs.Web.Aws.S3
Helper methods that deal with AWS S3 interactions |
|
|
CommonNetFuncs.EFCore
Helper methods that deal with EFCore, including providing basic actions against a DB Context and handling navigation properties. |
|
|
CommonNetFuncs.Web.Requests
Helper methods that deal with creating, sending, and handling the responses from REST API calls |
|
|
CommonNetFuncs.Web.Api
Generic API endpoints for use in an ASP.NET API |
|
|
CommonNetFuncs.Web.Common
Helper methods that deal with general web applications. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.0.25 | 256 | 4/3/2026 |
| 4.0.23 | 123 | 3/30/2026 |
| 4.0.22 | 156 | 3/3/2026 |
| 4.0.21 | 120 | 3/3/2026 |
| 4.0.20 | 117 | 2/26/2026 |
| 4.0.19 | 90 | 2/26/2026 |
| 4.0.18 | 119 | 2/24/2026 |
| 4.0.17 | 302 | 2/23/2026 |
| 4.0.15 | 248 | 2/8/2026 |
| 4.0.14 | 302 | 2/7/2026 |
| 4.0.12 | 1,575 | 2/3/2026 |
| 3.8.46 | 101 | 3/30/2026 |
| 3.8.45 | 124 | 3/30/2026 |
| 3.8.42 | 522 | 3/5/2026 |
| 3.8.41 | 91 | 2/26/2026 |
| 3.8.40 | 89 | 2/26/2026 |
| 3.8.39 | 91 | 2/26/2026 |
| 3.8.38 | 351 | 2/24/2026 |
| 3.8.34 | 113 | 2/3/2026 |
| 3.2.1 | 258 | 1/7/2025 |