Bidtellect.Tcf
1.1.0
dotnet add package Bidtellect.Tcf --version 1.1.0
NuGet\Install-Package Bidtellect.Tcf -Version 1.1.0
<PackageReference Include="Bidtellect.Tcf" Version="1.1.0" />
paket add Bidtellect.Tcf --version 1.1.0
#r "nuget: Bidtellect.Tcf, 1.1.0"
// Install Bidtellect.Tcf as a Cake Addin #addin nuget:?package=Bidtellect.Tcf&version=1.1.0 // Install Bidtellect.Tcf as a Cake Tool #tool nuget:?package=Bidtellect.Tcf&version=1.1.0
Transparency and Consent Framework C# SDK
A library written in C# which provides functionality to parse and serialize IAB TCF Strings.
This library currently only supports v2.0 of the specification.
Usage
Fetch the Global Vendor List (GVL)
You can get the most recent version of the GVL using the GvlClient
:
var client = new GvlClient();
VendorList gvl = client.Fetch();
Note: The GVL is not needed to parse TC strings as long as you know the Purpose and Vendor IDs.
Parse a TC String
You can parse a TC String using the TcStringParser
:
var tcString = "COvFyGBOvFyGBAbAAAENAPCAAOAAAAAAAAAAAEEUACCKAAA.IFoEUQQgAIQwgIwQABAEAAAAOIAACAIAAAAQAIAgEAACEAAAAAgAQBAAAAAAAGBAAgAAAAAAAFAAECAAAgAAQARAEQAAAAAJAAIAAgAAAYQEAAAQmAgBC3ZAYzUw";
// GVL can be null if the metadata is not needed.
var parser = new TcStringParser(gvl);
TcString model = parser.Parse(tcString);
You can instruct the parser to skip certain segments of the TC Strings using ParseOptions
:
TcString model = parser.Parse(tcString, new TcStringParser.ParseOptions {
ExcludePublisherTc = true,
});
Serialize a TC String
You can serialize a TcString
object back into a string
representation using TcStringSerializer
:
var serializer = new TcStringSerializer();
string message = serializer.Serialize(tcString);
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. 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. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- System.Text.Json (>= 5.0.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.