TCIDChecker_NET 2.0.8

.NET 6.0
dotnet add package TCIDChecker_NET --version 2.0.8
NuGet\Install-Package TCIDChecker_NET -Version 2.0.8
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="TCIDChecker_NET" Version="2.0.8" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add TCIDChecker_NET --version 2.0.8
#r "nuget: TCIDChecker_NET, 2.0.8"
#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 TCIDChecker_NET as a Cake Addin
#addin nuget:?package=TCIDChecker_NET&version=2.0.8

// Install TCIDChecker_NET as a Cake Tool
#tool nuget:?package=TCIDChecker_NET&version=2.0.8

TC ID Checker for .NET.

NuGet Version NuGet Downloads License

Determines that given TC ID is correct or wrong based on rules for .NET.

Features

  • Determines that given TC ID is correct or wrong based on rules.
  • If correct, you can use online validation functions.
  • Generates valid random TC ID.

How to Work

  • The ones digit of the sum of the first 10 digits gives the 11th digit.

  • The ones digit of 7 times the sum of the 1st, 3rd, 5th, 7th and 9th digits plus 9 times the sum of the 2nd, 4th, 6th and 8th digits gives the 10th digit.

  • The ones digit of 8 times the sum of the 1st, 3rd, 5th, 7th and 9th digits gives the 11th digit.

  • A built-in control ID function in all validate functions with given credentials via Web API supplied by General Directorate of Population and Citizenship Affairs of the Republic of Turkey.

  • Generates valid random TC ID when you want.

Usage


TCIDChecker checker = new TCIDChecker();  // New ID checker.


// bool r1 =
checker.controlID("08392566548", true, true, LogLevel.info); // Control ID. -- true


// bool r6 =
checker.controlID("02345678982", false, true, LogLevel.verbose); // Control ID. -- false

// String? r2 =
checker.generateID(false, false, LogLevel.info); // Generates valid random TC ID. -- random int.

// String? r8 =
checker.generateID(false, true, LogLevel.info); // Returns a print ready TC ID. -- 02345678982.

// String? r7 =
checker.generateID(true, true, LogLevel.info); // Returns a print ready TC ID. -- 02345678982.

// String? r9 =
checker.generateID(
    true, false, LogLevel.info); // Returns a valid fake TC ID start with 0. -- random int.


// bool r3 =
await checker.validateIDAsync("11111111111", "ali", "veli", 1900,
    false, LogLevel.verbose); // Validate ID from WEB API. -- false


// bool r4 =
await checker.validateForeignIDAsync("11111111111", "jack", "delay", 1, 1, 1900,
    true, LogLevel.debug); // Validate foreign ID from WEB API. -- false

// bool r5 =
await checker.validatePersonAndCardAsync(
    "11111111111",
    "ali",
    "veli",
    false,
    1,
    false,
    1,
    false,
    1900,
    "a15",
    796544,
    "y02n45764",
    true, LogLevel.info); // Validate Person and Card ID from WEB API. -- false

//Print area.
// Console.WriteLine(r1);
// Console.WriteLine(r2);
// Console.WriteLine(r3);
// Console.WriteLine(r4);
// Console.WriteLine(r5);
// Console.WriteLine(r6);
// Console.WriteLine(r7);
// Console.WriteLine(r8);
// Console.WriteLine(r9);
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-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)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.0.8 388 2/21/2022
2.0.7 358 2/20/2022
2.0.6 360 2/20/2022
2.0.5 367 2/13/2022
2.0.4 366 2/12/2022

* Colored log output upgraded to new version.