FARENTAL.Utils
1.0.4
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package FARENTAL.Utils --version 1.0.4
NuGet\Install-Package FARENTAL.Utils -Version 1.0.4
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="FARENTAL.Utils" Version="1.0.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add FARENTAL.Utils --version 1.0.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: FARENTAL.Utils, 1.0.4"
#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 FARENTAL.Utils as a Cake Addin #addin nuget:?package=FARENTAL.Utils&version=1.0.4 // Install FARENTAL.Utils as a Cake Tool #tool nuget:?package=FARENTAL.Utils&version=1.0.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
FARENTAL Utils
Microsoft.AspNetCore.Identity.PasswordOptions.PasswordValidator(string password)
Validate the given password
PostgresCache
Cache using postgresql as data store. To use,
- add nuget package
Npgsql.EntityFrameworkCore.PostgreSQL
- Create an instance of
DbContextOptions
var opt = new DbContextOptionsBuilder().UseNpgsql("host=localhost;database=db;user id=user;password=pwd").Options;
- Ensure database is exists
await PostgresCache.EnsureCachedDbExistsAsync(opt);
- How to use example
public Task<List<Customer>> GetCustomersFromDatabase() { // get customer from database } public async Task<Customer> GetCustomersAsync() { var key = "customers"; // get from cache, if not exist, call the method GetCustomersFromDatabase to get // data and add to the cache and cache for 1 hour var customers = PostgresCache.Instance.GetOrCreate<List<Customer>>( key, GetCustomersFromDatabase, TimeSpan.FromHours(1) ); // return the customer return customers; }
FirebasePush
Send push notification via firebase. Example
// set the default options
FirebasePush.DefaultOptions =
new FirebaseOptions {
ApplicationId = "aaaa",
SenderId = "bbbb",
DeviceToken = "xxxx"
};
// send
var payload = new { message = "Hellow World!" };
FirebasePush.Instance.SendAsync(payload);
// send to a different device
var opt = FirebasePush.DefaultOptions with { DeviceToken = "yyyy" };
FirebasePush.Instance.SendAsync(payload, opt);
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. 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. net9.0 was computed. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net5.0
- Microsoft.EntityFrameworkCore (>= 5.0.0)
- Microsoft.EntityFrameworkCore.Relational (>= 5.0.0)
- Microsoft.Extensions.Identity.Core (>= 2.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.