ClassFieldCodeBuilder
Represents a builder for constructing field code expressions in Telerik document models.
Definition
Namespace:Telerik.Windows.Documents.Model.Fields.CodeExpressions
Assembly:Telerik.Windows.Controls.RichTextBox.dll
Syntax:
public class FieldCodeBuilder
Inheritance: objectFieldCodeBuilder
Constructors
Methods
AddSwitch(string)
Adds a switch statement to the field code builder using the specified expression.
Declaration
public void AddSwitch(string switchCharacters)
Parameters
switchCharacters
The expression that defines the switch statement.
AddSwitch(string, FieldProperty)
Adds a switch statement to the field code builder with the specified case expression and field property.
Declaration
public void AddSwitch(string switchCharacters, FieldProperty prop)
Parameters
switchCharacters
The field property associated with the switch statement.
prop
The case expression as a string that will be used in the switch statement.
GetCodeExpressionFragment()
Retrieves the code expression fragment associated with the field code builder.
Declaration
public IEnumerable<Inline> GetCodeExpressionFragment()
Returns
A string representing the code expression fragment.
GetResultCode()
Gets the result code generated by the field code builder.
Declaration
public string GetResultCode()
Returns
The generated result code as a string.
RebuildFromCode(string)
Rebuilds a field code from the specified input string.
Declaration
public void RebuildFromCode(string fieldCode)
Parameters
fieldCode
The input string that represents the field code to be rebuilt.
Reset()
Resets the state of the FieldCodeBuilder, clearing any existing code expressions.
Declaration
public void Reset()
SetFieldArgument(FieldProperty)
Sets the argument for a field in the document model.
Declaration
public void SetFieldArgument(FieldProperty prop)
Parameters
prop
The field property to be set as an argument for the field.