Method CreateTextFragment
CreateTextFragment(string, int, int)
Creates a new WritableMessageFragment which represents a sub string of the original. Fragments are created using an ObjectPool so they can be reused. Use ReleaseFragment(MessageFragment) to return the fragment.
Declaration
public WritableMessageFragment CreateTextFragment(string original, int start, int end)
Parameters
Type | Name | Description |
---|---|---|
string | original | Original string |
int | start | Sub string start |
int | end | Sub string end |
Returns
Type | Description |
---|---|
WritableMessageFragment | A new fragment. |
CreateTextFragment(string)
Creates a new WritableMessageFragment which represents a string. Fragments are created using an ObjectPool so they can be reused. Use ReleaseFragment(MessageFragment) to return the fragment or allow the Message to handle returning the fragment if it is part of Fragments.
Declaration
public WritableMessageFragment CreateTextFragment(string original)
Parameters
Type | Name | Description |
---|---|---|
string | original | The source string. |
Returns
Type | Description |
---|---|
WritableMessageFragment | A new fragment. |