AP&C API Reference
|
This class defines a structure for creating a set of predictate expressions, such as would be used when composing a 'where' clause in a database query or an XPath qualifier. It is basically a simplified List{PredicateExpression} implemenation that allows iteration and some special methods for adding expressions. More...
Public Types | |
enum class | PredicateConnective { And , Or } |
The logic connective operators. More... | |
Public Member Functions | |
PredicateSet () | |
Creates a new, empty PredicateSet. More... | |
PredicateSet (PredicateExpression firstExpression) | |
Creates a new PredicateSet with its first PredicateExpression . More... | |
void | Add (PredicateConnective connective, PredicateExpression expression) |
Adds an expression to the set with a logical conjunctive operator. If called on a set with no expressions in it this method simply adds the expression without any logical operator. More... | |
void | Remove (PredicateExpression expression) |
Removes a predicate expression and the connective just before it. More... | |
PredicateExpression | Find (Predicate< PredicateExpression > match) |
Standard delegate-base Find method for lists. More... | |
List< PredicateExpression > | FindAll (Predicate< PredicateExpression > match) |
Standard delegate-base FindAll method for lists. More... | |
void | First (PredicateExpression expression) |
Sets the first expression in the set. If called on a set that already has an expression in it this will raise an InvalidOperationException. More... | |
void | And (PredicateExpression expression) |
Adds an expression to the set with a logical AND operator. If called on a set with no expressions in it this method simply adds the expression without any logical operator. This is a helper for More... | |
void | Or (PredicateExpression expression) |
Adds an expression to the set with a logical OR operator. If called on a set with no expressions in it this method simply adds the expression without any logical operator. This is a helper for More... | |
void | BeginPrecedence (PredicateExpression expression) |
Adds the beginning of a logical precedence block, used for grouping expressions together to achieve the desired predicate meaning, and the starting expression of that block. More... | |
void | BeginPrecedence (PredicateConnective connective, PredicateExpression expression) |
Adds the beginning of a logical precedence block after the conjunctive, used for grouping expressions together to achieve the desired predicate meaning, and adds expression inside the precedence. More... | |
void | BeginPrecedence () |
Increments the precedence level by addinging a precedence opener to the set. This is more efficiently done with the BeginPrecedence(PredicateConnective, PredicateExpression) overload, but may be useful for some logical requirements. More... | |
void | EndPrecedence (PredicateConnective connective, PredicateExpression expression) |
Adds the expression and the ending of a logical precedence block, used for grouping expressions together to achieve the desired predicate meaning. More... | |
void | EndPrecedence () |
Decrements the precedence level by adding a precedence closure to the set. This is more efficiently done with the EndPrecedence(PredicateConnective, PredicateExpression) overload, but may be useful for some logical requirements. More... | |
void | Clear () |
Clears the expression set. More... | |
override string | ToString () |
Returns the set of expressions in a verticle list. More... | |
void | Append (PredicateConnective connective, PredicateSet predicateSet) |
Appends each PredicateExpression from predicateSet on to the end of this instance. More... | |
IEnumerator< PredicateExpression > | GetEnumerator () |
Provides an enumerator for iterating the expression set. More... | |
System.Xml.Schema.XmlSchema | GetSchema () |
Returns null. More... | |
void | ReadXml (System.Xml.XmlReader reader) |
Deserializes the expression from the XmlReader. More... | |
void | WriteXml (System.Xml.XmlWriter writer) |
Serializes the expression into the XmlWriter. More... | |
void | GetObjectData (SerializationInfo info, StreamingContext context) |
Serializes (binary) a predicate set. More... | |
Static Public Member Functions | |
static PredicateSet | FromString (string predicate) |
Creates a PredicateSet from a predicate expression string. The string may use standard SQL predicate syntax or use PredicateOperators./> More... | |
Protected Member Functions | |
PredicateSet (SerializationInfo info, StreamingContext context) | |
Deserializes a predicate set. This deserialization uses the order of the serialization entries to rebuild the object from the serialized data. More... | |
Properties | |
int | PrecedenceLevel [get] |
Indicates the nested level of precedence. No precedence operators, or the proper number of matching open and close operators results in this property returning zero (0). A non-zero number is not good because it is likely to lead to faulting syntax in the component that translates this structure into a domain-specific language. More... | |
int | Count [get] |
Returns the number of expressions in the set. More... | |
PredicateExpression | this[int index] [get] |
Gets the JaguarSoftware.Logic.PredicateExpression at the specified index. More... | |
This class defines a structure for creating a set of predictate expressions, such as would be used when composing a 'where' clause in a database query or an XPath qualifier. It is basically a simplified List{PredicateExpression} implemenation that allows iteration and some special methods for adding expressions.
|
strong |
|
inlineprotected |
Deserializes a predicate set. This deserialization uses the order of the serialization entries to rebuild the object from the serialized data.
info | See SerializationInfo. |
context | See StreamingContext. |
|
inline |
Creates a new, empty PredicateSet.
|
inline |
Creates a new PredicateSet with its first PredicateExpression .
|
inline |
Adds an expression to the set with a logical conjunctive operator. If called on a set with no expressions in it this method simply adds the expression without any logical operator.
connective | The logic conjunctive to with which the expression is added to the predicate. |
expression | The PredicateExpression to be added. |
|
inline |
Adds an expression to the set with a logical AND operator. If called on a set with no expressions in it this method simply adds the expression without any logical operator. This is a helper for
Add(PredicateConjunctives.Add, expression )
.
expression | The PredicateExpression to be added. |
|
inline |
Appends each PredicateExpression from predicateSet on to the end of this instance.
predicateSet | The PredicateSet to append. |
|
inline |
Increments the precedence level by addinging a precedence opener to the set. This is more efficiently done with the BeginPrecedence(PredicateConnective, PredicateExpression) overload, but may be useful for some logical requirements.
|
inline |
Adds the beginning of a logical precedence block after the conjunctive, used for grouping expressions together to achieve the desired predicate meaning, and adds expression inside the precedence.
connective | The logical conjunctive before beginning the precedence block. |
expression | The first expression inside the precedence block. |
|
inline |
Adds the beginning of a logical precedence block, used for grouping expressions together to achieve the desired predicate meaning, and the starting expression of that block.
expression | The first expression inside the precedence block. |
|
inline |
Clears the expression set.
|
inline |
Decrements the precedence level by adding a precedence closure to the set. This is more efficiently done with the EndPrecedence(PredicateConnective, PredicateExpression) overload, but may be useful for some logical requirements.
|
inline |
Adds the expression and the ending of a logical precedence block, used for grouping expressions together to achieve the desired predicate meaning.
connective | The logical conjunctive applied to expression . |
expression | The last expression inside the precedence block. |
|
inline |
Standard delegate-base Find method for lists.
match | The Predicate<PredicateExpression> used to indicate a match. |
null
.
|
inline |
Standard delegate-base FindAll method for lists.
match | The Predicate<PredicateExpression> used to indicate a match. |
|
inline |
Sets the first expression in the set. If called on a set that already has an expression in it this will raise an InvalidOperationException.
expression | The PredicateExpression to be added. |
|
inlinestatic |
Creates a PredicateSet from a predicate expression string. The string may use standard SQL predicate syntax or use PredicateOperators./>
predicate | The predicate set to transform into an object. |
|
inline |
Provides an enumerator for iterating the expression set.
|
inline |
Serializes (binary) a predicate set.
info | See SerializationInfo. |
context | See StreamingContext. |
|
inline |
Returns null.
|
inline |
Adds an expression to the set with a logical OR operator. If called on a set with no expressions in it this method simply adds the expression without any logical operator. This is a helper for
Add(PredicateConjunctives.Or, expression )
.
expression | The PredicateExpression to be added. |
|
inline |
Deserializes the expression from the XmlReader.
reader | The reader from which the data is read. |
|
inline |
Removes a predicate expression and the connective just before it.
expression | The expression to be removed. |
|
inline |
Returns the set of expressions in a verticle list.
|
inline |
Serializes the expression into the XmlWriter.
writer | The writer into which the data will be serialized. |
|
get |
Returns the number of expressions in the set.
|
get |
Indicates the nested level of precedence. No precedence operators, or the proper number of matching open and close operators results in this property returning zero (0). A non-zero number is not good because it is likely to lead to faulting syntax in the component that translates this structure into a domain-specific language.
|
get |
Gets the JaguarSoftware.Logic.PredicateExpression at the specified index.
Returns the JaguarSoftware.Logic.PredicateExpression at the specified index.