Class ExpressionSerializer
Inheritance
System.Object
ExpressionSerializer
Implements
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Sartorius.SAF.Serialization
Assembly: Sartorius.SAF.dll
Syntax
[Export(typeof(IExpressionSerializer))]
public class ExpressionSerializer : IExpressionSerializer
Constructors
View SourceExpressionSerializer()
Create a new instance of ExpressionSerializer class.
Declaration
[ImportingConstructor]
public ExpressionSerializer()
ExpressionSerializer(TypeResolver, IEnumerable<CustomExpressionXmlConverter>)
Declaration
public ExpressionSerializer(TypeResolver resolver, IEnumerable<CustomExpressionXmlConverter> converters = null)
Parameters
Type | Name | Description |
---|---|---|
TypeResolver | resolver | |
System.Collections.Generic.IEnumerable<CustomExpressionXmlConverter> | converters |
Properties
View SourceConverters
Gets the list of available CustomExpressionXmlConverter.
Declaration
public List<CustomExpressionXmlConverter> Converters { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<CustomExpressionXmlConverter> |
Methods
View SourceDeserialize<TDelegate>(XElement)
Declaration
public Expression<TDelegate> Deserialize<TDelegate>(XElement xml)
Parameters
Type | Name | Description |
---|---|---|
System.Xml.Linq.XElement | xml |
Returns
Type | Description |
---|---|
System.Linq.Expressions.Expression<TDelegate> |
Type Parameters
Name | Description |
---|---|
TDelegate |
GenerateXmlFromExpressionCore(Expression)
Declaration
public XElement GenerateXmlFromExpressionCore(Expression e)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.Expressions.Expression | e |
Returns
Type | Description |
---|---|
System.Xml.Linq.XElement |
Serialize(Expression)
Serialize an expression.
Declaration
public XElement Serialize(Expression expression)
Parameters
Type | Name | Description |
---|---|---|
System.Linq.Expressions.Expression | expression | The expression to serialize. |
Returns
Type | Description |
---|---|
System.Xml.Linq.XElement | An serialized expression as System.Xml.Linq.XElement. |