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
#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

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 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.

Version Downloads Last updated
8.0.1 775 11/30/2023
6.0.5 4,173 3/27/2023
6.0.4 2,902 2/16/2023
6.0.3 255 2/2/2023
6.0.1 4,989 5/5/2022
6.0.0 523 4/27/2022
3.1.19 419 9/24/2021
3.1.10 7,988 12/16/2020
3.1.0 4,152 4/13/2020