Table of Contents

Class Expr

Namespace
DynaSharp
Assembly
DynaSharp.dll

The vocabulary of expressions without a schema, for using static DynaSharp.Expr;: Attr("status") and Attr<int>("orderCount"). Struct conditions cover comparisons, existence and begins_with, and an interpolated expression covers the rest of the grammar: $"size({Attr("tags")}) < {10}".

public static class Expr
Inheritance
Expr
Inherited Members

Methods

Attr(string)

Makes an attribute without a type, which takes any value.

public static Attr Attr(string path)

Parameters

path string

The name or document path, such as status, address.city or lines[2].sku.

Returns

Attr

The attribute.

Exceptions

ArgumentException

path is null or empty.

Attr<T>(string)

Makes a number attribute, the form to use with Return(...) and a typed Add. For other types, a generated handle has the right converter, and Attr<T, TConverter> can be created by hand.

public static Attr<T, NumberConverter<T>> Attr<T>(string path) where T : INumberBase<T>

Parameters

path string

The name or document path.

Returns

Attr<T, NumberConverter<T>>

The attribute.

Type Parameters

T

The number type.

Exceptions

ArgumentException

path is null or empty.