WWB.BinarySerializer.Codecs.Text
1.0.3
dotnet add package WWB.BinarySerializer.Codecs.Text --version 1.0.3
NuGet\Install-Package WWB.BinarySerializer.Codecs.Text -Version 1.0.3
<PackageReference Include="WWB.BinarySerializer.Codecs.Text" Version="1.0.3" />
<PackageVersion Include="WWB.BinarySerializer.Codecs.Text" Version="1.0.3" />
<PackageReference Include="WWB.BinarySerializer.Codecs.Text" />
paket add WWB.BinarySerializer.Codecs.Text --version 1.0.3
#r "nuget: WWB.BinarySerializer.Codecs.Text, 1.0.3"
#:package WWB.BinarySerializer.Codecs.Text@1.0.3
#addin nuget:?package=WWB.BinarySerializer.Codecs.Text&version=1.0.3
#tool nuget:?package=WWB.BinarySerializer.Codecs.Text&version=1.0.3
WWB.BinarySerializer.Codecs.Text
Strict text codecs for WWB.BinarySerializer.
using WWB.BinarySerializer.Codecs.Text;
var runtime = new SerializerBuilder()
.AddAsciiCodecs()
.Build();
[BinaryField(1, ValueCodecName = LengthPrefixedAsciiStringValueCodec.CodecName)]
public string DeviceCode { get; set; } = string.Empty;
Use AddHexCodecs() for both length-prefixed and fixed-length Hex codecs, or AddTextCodecs() to register all ASCII and Hex codecs.
LengthPrefixedAsciiStringValueCodec uses the field's LengthPrefixSize, from one through four bytes. FixedLengthAsciiStringValueCodec uses the field's FixedLength and provides exact-length, prefix-free ASCII fields:
[BinaryField(
1,
FixedLength = 8,
ValueCodecName = FixedLengthAsciiStringValueCodec.CodecName)]
public string DeviceCode { get; set; } = string.Empty;
Both reject non-ASCII characters and bytes.
LengthPrefixedHexStringValueCodec and FixedLengthHexStringValueCodec encode hexadecimal text as binary bytes. For fixed Hex fields, FixedLength is the binary byte count, so FixedLength = 2 requires four Hex characters. Odd-length input and non-hexadecimal characters are rejected with FormatException; decoded text is normalized to uppercase.
| Product | Versions 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. |
-
net6.0
- WWB.BinarySerializer (>= 1.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.