TrishkaV.TypeDetect 1.0.1

dotnet add package TrishkaV.TypeDetect --version 1.0.1
                    
NuGet\Install-Package TrishkaV.TypeDetect -Version 1.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="TrishkaV.TypeDetect" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TrishkaV.TypeDetect" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="TrishkaV.TypeDetect" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add TrishkaV.TypeDetect --version 1.0.1
                    
#r "nuget: TrishkaV.TypeDetect, 1.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.
#:package TrishkaV.TypeDetect@1.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=TrishkaV.TypeDetect&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=TrishkaV.TypeDetect&version=1.0.1
                    
Install as a Cake Tool

TypeDetect

Library: Lightweight C# language extension to assess objects types, including nullables and objects mapped from database readers.

What to expect: this library provides a series of methods that allow to detect the underlying type of an object, including if this is a nullable (it's value can be null) or if is a null as returned by a database reader (DBNull).

add "using TypeDetect;" to enable the language extension and call the type detection methods on all objects.

Examples: ".IsDateTime()" returns true if the object is a datetime and false otherwise. ".IsDateTimeNullable()" returns true if the object is a datetime OR null, and false otherwise.

".IsNumeric()" returns true if the object is "int", "short", "double", ... ".IsNumericNullable()" as before, including null values.

".IsText()" returns true for strings and chars. ".IsTextNullable()" as before, including null values.

NOTE Legally this comes with no warranty and you are using it at your own risk.

This library have been tested agaist real database extractions and objects of all the mentioned types its results hold correct.

If you find an issue with the results or implementation or an optimization could be made please feel free to contact me or issue a pull request. You will be credited for any contribution.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  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.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net6.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on TrishkaV.TypeDetect:

Package Downloads
TrishkaV.EntityScribe

Lightweight C# language extension to map objects and type from database reader executions, memory allocation is optimized for performance. Open source project at github.com/TrishkaV/EntityScribe

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.1 228 4/11/2023
1.0.0 346 4/11/2023