UiPath.Studio.Activities.Api.Expressions
In this section you can find more information on how to build activities using UiPath.Studio.Activities.Api.Expressions.
IDesignTimeExpressionExpanderService
This feature was introduced in UiPath.Studio.Activities.Api v21.10.
Service used to expand/unwrap dynamic expressions at design time, e,g, dynamic file paths.
Properties
| Type | Name | Description |
|---|---|---|
| string | ExpandString | Expands the given string expression. |
| string | GenerateDynamicString | Generates a dynamic expression string based on the specified value. For example, if the given string is a file path that is user-specific (e.g. a file path that points to something in My Documents), this will turn that static string into a dynamic, user-agnostic expression that can be "expanded" by ExpandString(string) at design time and evaluated by WWF at runtime. It turns C:UsersUserSomeFolder to something like string.Format("{}\SomeFolder", Environment.UserFolder). |
IExpressionService
This feature was introduced in UiPath.Studio.Activities.Api v21.4.
Interface for returning tokens from an expression.
Methods
IEnumerable GetIdentifierAndLiteralList(string expression, string expressionLanguage)
Returns a flat list of all identifiers and literals encountered in the given expression, in the order in which they were encountered.
| Parameter Type | Parameter Name | Remarks |
|---|---|---|
| string | expression | The expression to tokenize. |
| string | expressionLanguage | The dark theme. |
Token
This feature was introduced in UiPath.Studio.Activities.Api v21.4.
The smallest element of an expression, for example an identifier or a literal value.
Properties
| Type | Name | Description |
|---|---|---|
| string | StringRepresentation | The name of the token. |
| string | TokenType | The token type. |
| Type | ExpressionType | The type of expression. |
TokenType
This feature was introduced in UiPath.Studio.Activities.Api v21.4.
The type of token.
Constants
| Type | Name | Description |
|---|---|---|
| string | ObjectCreation | The token represents the creation of an object. |
| string | IdentifierReference | The token represents the referencing of an object or method by name. |
| string | LiteralUsage | The token represents the usage of a literal value. |