Class Parser

Parses expressions written in strings into CodeDom expressions. There is a certain amount of context that the parser may need to be familiar with. This is why the parsing methods are not exposed as static.

Inheritance
System.Object
Parser
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Mediachase.Commerce.Marketing.Validators.Providers.DomParser
Assembly: Mediachase.Commerce.Marketing.Validators.dll
Version: 10.8.0
Syntax
public class Parser

Constructors

Parser()

Default constructor.

Declaration
public Parser()

Properties

Enums

A collection of identifiers that should be recognized as enums.

Declaration
public Dictionary<string, CodeTypeReference> Enums { get; }
Property Value
Type Description
System.Collections.Generic.Dictionary<System.String, System.CodeDom.CodeTypeReference>

Fields

A collection of names of fields.

Declaration
public StringCollection Fields { get; }
Property Value
Type Description
System.Collections.Specialized.StringCollection

RecognizedTypes

A collection of identifiers that should be recognized as types.

Declaration
public Dictionary<string, CodeTypeReference> RecognizedTypes { get; }
Property Value
Type Description
System.Collections.Generic.Dictionary<System.String, System.CodeDom.CodeTypeReference>

Methods

ParseExpression(String)

Parses an expression into a System.CodeDom.CodeExpression.

Declaration
public CodeExpression ParseExpression(string exp)
Parameters
Type Name Description
System.String exp

expression to parse

Returns
Type Description
System.CodeDom.CodeExpression

CodeDom representing the expression