Class
FieldCodeBuilder

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:

cs-api-definition
public class FieldCodeBuilder

Inheritance: objectFieldCodeBuilder

Constructors

FieldCodeBuilder(string)

Declaration

cs-api-definition
public FieldCodeBuilder(string fieldType)

Parameters

fieldType

string

Methods

AddSwitch(string)

Adds a switch statement to the field code builder using the specified expression.

Declaration

cs-api-definition
public void AddSwitch(string switchCharacters)

Parameters

switchCharacters

string

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

cs-api-definition
public void AddSwitch(string switchCharacters, FieldProperty prop)

Parameters

switchCharacters

string

The field property associated with the switch statement.

prop

FieldProperty

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

cs-api-definition
public IEnumerable<Inline> GetCodeExpressionFragment()

Returns

IEnumerable<Inline>

A string representing the code expression fragment.

GetResultCode()

Gets the result code generated by the field code builder.

Declaration

cs-api-definition
public string GetResultCode()

Returns

string

The generated result code as a string.

RebuildFromCode(string)

Rebuilds a field code from the specified input string.

Declaration

cs-api-definition
public void RebuildFromCode(string fieldCode)

Parameters

fieldCode

string

The input string that represents the field code to be rebuilt.

Reset()

Resets the state of the FieldCodeBuilder, clearing any existing code expressions.

Declaration

cs-api-definition
public void Reset()

SetFieldArgument(FieldProperty)

Sets the argument for a field in the document model.

Declaration

cs-api-definition
public void SetFieldArgument(FieldProperty prop)

Parameters

prop

FieldProperty

The field property to be set as an argument for the field.