-
Notifications
You must be signed in to change notification settings - Fork 0
API Library Utility
Home / API Library / Utility
API Library Utility various Utilities. The API Library Utility Methods list with Parameters, Return examples.
GetMD5 - Details
Generate the MD5 hash of the input parameter. Returns String
Method: API.Utility.GetMD5
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
input |
String | Input String |
Return: String
Code usage C# example:
var signature = Utility.GetMD5(Utility.GetCustomConfig("APP_SALSA") + DTO.MtrInput);GetSHA256 - Details
Geberate the SHA256 hash of the input parameter. Returns String
Method: API.Utility.GetSHA256
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
input |
String | Input String |
Return: String
JsonSerialize_IgnoreLoopingReference - Details
Serialize to JSON ignoring looping references. Returns JSON String
Method: API.Utility.JsonSerialize_IgnoreLoopingReference
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
input |
dynamic | Input dynamic |
Return: JSON String
JsonDeserialize_IgnoreLoopingReference - Details
Deserialize from JSON ignoring looping references. Returns dynamic
Method: API.Utility.JsonDeserialize_IgnoreLoopingReference
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
input |
String | Input String |
Return: dynamic
GetCustomConfig - Details
Get the value from a custom config by sectionName and key (or keyonly). Returns String
Method: API.Utility.GetCustomConfig
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
sectionName |
String | Configuration Section Name | |
key |
String | Configuration key |
Return: String
Code usage C# example:
this.MtrInput = Utility.DecodeBase64ToUTF8((string)parameters["MtrInput"]);DecodeBase64ToUTF8 - Details
Decode a base64 data into a C# UTF8 string, which covers for both UTF8 and UTF16. Returns String
Method: API.Utility.DecodeBase64ToUTF8
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
data |
String | Data String |
Return: String
Code usage C# example:
this.MtrInput = Utility.DecodeBase64ToUTF8((string)parameters["MtrInput"]);