Table of Contents

Class AppConfiguration_WebService

Namespace
PolarStudio
Assembly
PolarStudio.dll

This class contains the configuration parameters for a WebService

public class AppConfiguration_WebService
Inheritance
AppConfiguration_WebService
Inherited Members
Extension Methods

Properties

Address

The HTTP address to connect to

public string Address { get; set; }

Property Value

string

ApplicationCodeName

The CodeName for the customer's application

public string ApplicationCodeName { get; set; }

Property Value

string

CustomerCodeName

The CodeName for the current customer

public string CustomerCodeName { get; set; }

Property Value

string

EncryptionKey

A symatric key used to encrypt responses.

public string EncryptionKey { get; set; }

Property Value

string

LogErrors

A boolean indicating that errors are to be logged using this WebService

public bool LogErrors { get; set; }

Property Value

bool

LogLogins

A boolean indicating that log-ins are to be logged using this WebService

public bool LogLogins { get; set; }

Property Value

bool

SignKey

The symatric key used to sign requests

public string SignKey { get; set; }

Property Value

string

Methods

CallWebservice_Synchronous_ForScript(ref string, string, string, object, int)

To call the webservice with the given parameters synchronously.

public object CallWebservice_Synchronous_ForScript(ref string pErrorMessage, string pAction, string pActionParameter = "", object pPostData = null, int pExpirationSeconds = 0)

Parameters

pErrorMessage string

A by-ref string that will be filled with an error message is applicable.

pAction string

The action to perform.

pActionParameter string

Some action-parameter

pPostData object

Postdata as string or as object (collection / dictionary)

pExpirationSeconds int

The max time to wait in seconds for the result. Pass 0 to wait infinitely.

Returns

object

A dictionary or collection with the result of the WebService or Nothing in case of an error.

DecryptString(string)

This helper decrypts a string that was encrypted using the EncryptString helper and has the same key.

public string DecryptString(string pEncryptedValue)

Parameters

pEncryptedValue string

Returns

string

EncryptString(string, bool)

This helper encrypts a string with the stored encryption key

public string EncryptString(string pValue, bool pReturnAsHex = true)

Parameters

pValue string

The text to encrypt.

pReturnAsHex bool

To return the data as hex (instead of binary). Defaults to True.

Returns

string

A string (either Hex or binary) with the encrypted text representing the given value.

IsImplemented()

A very rough check to see if this WebService looks like to be defined with sufficient parameters. Checks on Address and SignKey

public bool IsImplemented()

Returns

bool