Dalk.PropertiesSerializer
1.0.3
.NET 5.0
This package targets .NET 5.0. The package is compatible with this framework or higher.
.NET Core 3.1
This package targets .NET Core 3.1. The package is compatible with this framework or higher.
.NET Framework 4.5
This package targets .NET Framework 4.5. The package is compatible with this framework or higher.
dotnet add package Dalk.PropertiesSerializer --version 1.0.3
NuGet\Install-Package Dalk.PropertiesSerializer -Version 1.0.3
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="Dalk.PropertiesSerializer" Version="1.0.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Dalk.PropertiesSerializer --version 1.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Dalk.PropertiesSerializer, 1.0.3"
#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 Dalk.PropertiesSerializer as a Cake Addin #addin nuget:?package=Dalk.PropertiesSerializer&version=1.0.3 // Install Dalk.PropertiesSerializer as a Cake Tool #tool nuget:?package=Dalk.PropertiesSerializer&version=1.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Dalk.Properties
A properties serializer for C#
Documentation
import the classes
// import the serializer classes
using Dalk.PropertiesSerializer;
create a type to serialize
using Dalk.PropertiesSerializer;
public class TestObject
{
// use the attribute to specify a custom name
[PropertyName("test_int")]
public int TestInt { get; set; }
public string TestString { get; set; }
public bool TestBool { get; set; }
public SecondTestObject SecondTestObject { get; set; }
}
serialize an object
string properties = Serializer.Serialize(@object);
deserialize a string
var @object = Serializer.Deserialize<TestObject>(properties);
create a custom type serializer
using System;
using Dalk.PropertiesSerializer.TypeSerializers;
[TypeSerializer]
public class TestTypeSerializer : ITypeSerializer
{
public object Deserialize(string o) => TestType.Parse(o);
Type type = typeof(TestType);
public Type GetCType() => type;
public string Serialize(object o) => o.ToString();
}
register all type type serializers from the current assembly
Serializer.LoadTypeSerializersFromAssembly(Assembly.GetAssembly(GetType()));
add an object as a type serializer
Serializer.AddCustomTypeSerializer(new TestTypeSerializer());
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. 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. |
.NET Core | netcoreapp3.1 is compatible. |
.NET Framework | net45 is compatible. net451 is compatible. net452 is compatible. net46 is compatible. net461 is compatible. net462 is compatible. net463 was computed. net47 is compatible. net471 is compatible. net472 is compatible. net48 is compatible. net481 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETCoreApp 3.1
- No dependencies.
-
.NETFramework 4.5
- No dependencies.
-
.NETFramework 4.5.1
- No dependencies.
-
.NETFramework 4.5.2
- No dependencies.
-
.NETFramework 4.6
- No dependencies.
-
.NETFramework 4.6.1
- No dependencies.
-
.NETFramework 4.6.2
- No dependencies.
-
.NETFramework 4.7
- No dependencies.
-
.NETFramework 4.7.1
- No dependencies.
-
.NETFramework 4.7.2
- No dependencies.
-
.NETFramework 4.8
- No dependencies.
-
net5.0
- No dependencies.
-
net6.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.