Tokenization
Less oft-needed functions to manipulate Tokens.
Static Functions
Name | Description |
---|---|
IsResolvable |
Return whether the given object is an IResolvable object. |
Resolve |
Resolves an object by evaluating all tokens and removing any undefined or empty objects or arrays. |
ReverseList |
Un-encode a Tokenized value from a list. |
ReverseNumber |
Un-encode a Tokenized value from a number. |
ReverseString |
Un-encode a string potentially containing encoded tokens. |
StringifyNumber |
Stringify a number directly or lazily if it's a Token. |
IsResolvable
using AlibabaCloud.SDK.ROS.CDK.Core;
Tokenization.IsResolvable(object Obj);
Return whether the given object is an IResolvable object.
This is different from Token.isUnresolved() which will also check for encoded Tokens, whereas this method will only do a type check on the given object.
- Type: object
Resolve
using AlibabaCloud.SDK.ROS.CDK.Core;
Tokenization.Resolve(object Obj, ResolveOptions Options);
Resolves an object by evaluating all tokens and removing any undefined or empty objects or arrays.
Values can only be primitives, arrays or tokens. Other objects (i.e. with methods) will be rejected.
- Type: object
The object to resolve.
- Type: ResolveOptions
Prefix key path components for diagnostics.
ReverseList
using AlibabaCloud.SDK.ROS.CDK.Core;
Tokenization.ReverseList(string[] L);
Un-encode a Tokenized value from a list.
- Type: string[]
ReverseNumber
using AlibabaCloud.SDK.ROS.CDK.Core;
Tokenization.ReverseNumber(double N);
Un-encode a Tokenized value from a number.
- Type: double
ReverseString
using AlibabaCloud.SDK.ROS.CDK.Core;
Tokenization.ReverseString(string S);
Un-encode a string potentially containing encoded tokens.
- Type: string
StringifyNumber
using AlibabaCloud.SDK.ROS.CDK.Core;
Tokenization.StringifyNumber(double X);
Stringify a number directly or lazily if it's a Token.
If it is an object (i.e., { Ref: 'SomeLogicalId' }), return it as-is.
- Type: double