ClassFieldCodeExpression
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
FieldCodeExpression()
Declaration
public FieldCodeExpression()
Properties
FieldTypeNode
Represents a node in the field type expression of a code field in the Telerik document model.
Declaration
public FieldTypeNode FieldTypeNode { get; set; }
Property Value
SwitchNodes
Represents the switch nodes in a field code expression, allowing for conditional logic based on the provided cases.
Declaration
public List<FieldSwitchNode> SwitchNodes { get; }
Property Value
Methods
ContainsSwitch(string)
Determines whether the specified string is contained within the field code expression's switch options.
GetCodeExpressionFragment()
Retrieves the code expression fragment associated with the field code expression.
Declaration
public override IEnumerable<Inline> GetCodeExpressionFragment()
Returns
A string representing the code expression fragment.
Overrides
GetCodeExpressionString()
Retrieves the string representation of the code expression associated with the field.
Declaration
public override string GetCodeExpressionString()
Returns
A string that represents the code expression. If no valid code expression exists, returns an empty string.
Overrides
GetFieldSwitch(string)
Retrieves the field switch associated with the specified field name.
Declaration
public FieldSwitchNode GetFieldSwitch(string switchChars)
Parameters
switchChars
The name of the field for which the switch is being retrieved.
Returns
Returns the field switch as a string.
GetSwitchArgument(string)
Retrieves the switch argument for the field code expression based on the provided string input.
Declaration
public IFieldArgumentNode GetSwitchArgument(string switchChar)
Parameters
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.