Info
Version: | 1.1.1 |
Author(s): | vm |
Last Update: | Wednesday, June 20, 2018 |
.NET Fiddle: | Create the first Fiddle |
Project Url: | https://github.com/vmelamed/vm/tree/master/Aspects/Linq/Expressions/Serialization |
NuGet Url: | https://www.nuget.org/packages/AspectExpressionSerialization |
Install
Install-Package AspectExpressionSerialization
dotnet add package AspectExpressionSerialization
paket add AspectExpressionSerialization
AspectExpressionSerialization Download (Unzip the "nupkg" after downloading)
Dependencies
- CommonServiceLocator(>= 2.0.3)
Tags
* Very simple interface.
Essentially the interface consists of two methods (with a couple of convenient overloads) on the class XmlExpressionSerializer from the namespace vm.Aspects.ExpressionSerialization:
- public static XElement ToXmlElement(Expression expression);
- public static Expression ToExpression(XElement document);
* The overloads allow for serializing to and from whole XDocument objects.
* The serializer supports serialization of constant expression of the following data types:
- all primitive types;
- enum types;
- nullable types;
- the most of the FCL basic types like: string, DateTime, TimeSpan, Uri, Guid, DBNull;
- any serializable types;
- any types marked with DataContractAttribute;
- anonymous types;
- arrays and generic sequences of the above;
- The XML documents are validated against a schema: urn:schemas-vm-com:Aspects.Expression
-- targets .NET 4.6.2 and 4.7.1.