FieldCodeExpression
Represents a field code expression in a document model, allowing for dynamic evaluation of code within fields.
Definition
Namespace:Telerik.Windows.Documents.Model.Fields.CodeExpressions
Assembly:Telerik.Windows.Controls.RichTextBox.dll
Syntax:
public class FieldCodeExpression : FieldNodeWithArgumentBase, IFieldCodeExpressionNode
Inheritance: objectFieldNodeWithArgumentBaseFieldCodeExpression
Implements:
Inherited Members
Constructors
public FieldCodeExpression()
Properties
Represents a node in the field type expression of a code field in the Telerik document model.
public FieldTypeNode FieldTypeNode { get; set; }
Represents the switch nodes in a field code expression, allowing for conditional logic based on the provided cases.
public List<FieldSwitchNode> SwitchNodes { get; }
Methods
Determines whether the specified string is contained within the field code expression's switch options.
Retrieves the code expression fragment associated with the field code expression.
public override IEnumerable<Inline> GetCodeExpressionFragment()
A string representing the code expression fragment.
Overrides:
Retrieves the string representation of the code expression associated with the field.
public override string GetCodeExpressionString()
A string that represents the code expression. If no valid code expression exists, returns an empty string.
Overrides:
Retrieves the field switch associated with the specified field name.
public FieldSwitchNode GetFieldSwitch(string switchChars)
The name of the field for which the switch is being retrieved.
Returns:Returns the field switch as a string.
Retrieves the switch argument for the field code expression based on the provided string input.
public IFieldArgumentNode GetSwitchArgument(string switchChar)
The string input representing the switch condition.
Returns:A value of type IFieldArgumentNode that corresponds to the switch argument for the given input. Returns null if the input does not match any known switch conditions.