Template10.Service.Serialization 1.0.1

Part of Template 10, a Library of Helpers for UWP.

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
Install-Package Template10.Service.Serialization -Version 1.0.1
dotnet add package Template10.Service.Serialization --version 1.0.1
<PackageReference Include="Template10.Service.Serialization" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Template10.Service.Serialization --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Template10.Service.Serialization, 1.0.1"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Template10.Service.Serialization as a Cake Addin
#addin nuget:?package=Template10.Service.Serialization&version=1.0.1

// Install Template10.Service.Serialization as a Cake Tool
#tool nuget:?package=Template10.Service.Serialization&version=1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

SerializationService

The SerializationService provides a simple abstracted interface to a service that implements consistent serialization and deserialization of objects:

// Serialize the passed object to a string. Returns null if the parameter is null. Returns an empty string
// if the parameter is an empty string.
string Serialize(object parameter);

// Converts the passed string back to an object. If the passed parameter is null, null is returned. If the
// string is empty, an empty string is returned.
object Deserialize(string parameter);

// Converts the passed string back to a object of type T. If deserialization fails, the default value
// for type T is returned. Note that if T is the wrong type for the passed serialized value, an
// InvalidCastException can occur. This can be avoided by using the next method.
T Deserialize<T>(string parameter);

// Attempts to deserialize the value while catching any InvalidCastException that may occur. Returns
// true if a value value was obtained, otherwise false is returned, along with the defaul value for
// type T.
bool TryDeserialize<T>(string parameter, out T result);

The NavigationService sets up an instance to the Template 10-included JSON SerializationService:

SerializationService = Service.SerializationService.SerializationService.Json;

SerializationService

The SerializationService provides a simple abstracted interface to a service that implements consistent serialization and deserialization of objects:

// Serialize the passed object to a string. Returns null if the parameter is null. Returns an empty string
// if the parameter is an empty string.
string Serialize(object parameter);

// Converts the passed string back to an object. If the passed parameter is null, null is returned. If the
// string is empty, an empty string is returned.
object Deserialize(string parameter);

// Converts the passed string back to a object of type T. If deserialization fails, the default value
// for type T is returned. Note that if T is the wrong type for the passed serialized value, an
// InvalidCastException can occur. This can be avoided by using the next method.
T Deserialize<T>(string parameter);

// Attempts to deserialize the value while catching any InvalidCastException that may occur. Returns
// true if a value value was obtained, otherwise false is returned, along with the defaul value for
// type T.
bool TryDeserialize<T>(string parameter, out T result);

The NavigationService sets up an instance to the Template 10-included JSON SerializationService:

SerializationService = Service.SerializationService.SerializationService.Json;

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated