Info
Version: | 2.0.1 |
Author(s): | Val Melamed |
Last Update: | Tuesday, September 4, 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/vm.Aspects.Linq.Expressions.Serialization |
Install
Install-Package vm.Aspects.Linq.Expressions.Serialization
dotnet add package vm.Aspects.Linq.Expressions.Serialization
paket add vm.Aspects.Linq.Expressions.Serialization
vm.Aspects.Linq.Expressions.Serialization Download (Unzip the "nupkg" after downloading)
Dependencies
- System.ServiceModel.Primitives(>= 4.5.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 expressions of the following data types:
- all primitive types;
- enum types;
- nullable types;
- the most of the BCL basic types like: string, DateTime, TimeSpan, Uri, Guid, DBNull;
- any serializable type;
- 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.Linq.Expressions.Serialization
* Targets .NET Standard and System.ServiceModel.Primitives 4.5.3.