Talrace.Core.Extensions
8.0.1
dotnet add package Talrace.Core.Extensions --version 8.0.1
NuGet\Install-Package Talrace.Core.Extensions -Version 8.0.1
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="Talrace.Core.Extensions" Version="8.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Talrace.Core.Extensions --version 8.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Talrace.Core.Extensions, 8.0.1"
#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 Talrace.Core.Extensions as a Cake Addin
#addin nuget:?package=Talrace.Core.Extensions&version=8.0.1
// Install Talrace.Core.Extensions as a Cake Tool
#tool nuget:?package=Talrace.Core.Extensions&version=8.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
About
Provides extensions for IPrincipal and IIdentity interfaces, DateTime converting.
Available extensions
GetUserId - extension method for IIdentity interface. Method returns the value of the first claim of type NameIdentifier if the user is authenticated (Identity should be an instance of ClaimsIdentity). If the user is not authenticated or a claim with type NameIdentifier is not found, the method returns null.
GetUserId - extension method for IPrincipal interface. Method returns the value of the first claim of type NameIdentifier if the user is authenticated (Identity should be an instance of ClaimsIdentity). If the user is not authenticated or a claim with type NameIdentifier is not found, the method returns null.
FirstClaimValue - extension method for IIdentity interface. Method accepts variable number of claims types. Method returns the value of the user's first claim if the user is authenticated (Identity should be instance of ClaimsIdentity). If the user is not authenticated or a claim with type is not found, the method returns null.
FirstClaimValue - extension method for IPrincipal interface. Method accepts variable number of claims types. Method returns the value of the user's first claim if the user is authenticated (Identity should be instance of ClaimsIdentity). If the user is not authenticated or a claim with type is not found, the method returns null.
ToDateString - extension method for convert date from nullable or not nullable unix to string format.
ToUnixTimeSeconds - convert date from nullable or not nullable date time to unix value.
ToDate - convert date from nullable or not nullable unix date to date time value.
ToTimeString - сonvert seconds to time.
ToTimeWithSecondsString - сonvert seconds to to time with seconds.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Talrace.Core.Extensions:
Package | Downloads |
---|---|
Talrace.Core.SignalR
Core SignalR |
GitHub repositories
This package is not used by any popular GitHub repositories.