Class ContextContainer
- Namespace
- PolarStudio
- Assembly
- PolarStudio.dll
This class provides access to the Context object and supplies various functions that extend the scripting language.
public class ContextContainer
- Inheritance
-
ContextContainer
- Inherited Members
- Extension Methods
Methods
AddMenuItem(string, string, string, string, string)
This method can only be used during the creation of a scripted menu. It will then create a new menu item the 'current' location.
public void AddMenuItem(string pCaption, string pExplanation = "", string pScriptNameAndParameter = "", string pIconTC = "", string pShortCaptionTC = "")
Parameters
pCaption
stringThe caption of the menu item
pExplanation
stringAn optional explanation that can be shown in a mouse-over.
pScriptNameAndParameter
stringThis parameter sets what to do when the item is selected. It must contain a script expression to fire server-side. It can also be like 'Action;ActionParameter' to fire an action in the browser. Alternatively it can contain an expression like '@JavaScriptExpression'
pIconTC
stringThe Icon for this menu item
pShortCaptionTC
stringA short caption that can be used in your scripts.
BeginMenu(string, string, string, string)
This method can only be used during the creation of a scripted menu. It will then create a new sub-menu at the 'current' location.
public void BeginMenu(string pCaption, string pExplanation = "", string pIconTC = "", string pShortCaptionTC = "")
Parameters
pCaption
stringThe caption for the sub menu
pExplanation
stringAn optional explanation that can be shown in a mouse-over.
pIconTC
stringAn icon (text code) to use.
pShortCaptionTC
stringA short caption.
ByteArrayToString(byte[])
This method will create a binary string from the given byte array.
public static string ByteArrayToString(byte[] pByteArray)
Parameters
pByteArray
byte[]An array of bytes
Returns
- string
A string with characters that equal the given bytes.
ClearDebug()
This method will clear the Debug panel in Polar Studio.
public void ClearDebug()
ClearQueries()
This method will clear the Queries panel in Polar Studio.
public void ClearQueries()
ClearRequests()
This method will clear the web-requests panel in Polar Studio.
public void ClearRequests()
CompressString(string)
This method will compress a string using the ZLib algorithm.
public static string CompressString(string pInputString)
Parameters
pInputString
stringThe string to compress. Can contain unicode characters.
Returns
- string
A compressed version of the given string. It will be like "@ZLIB:" + InputStringLength + "@" + CompressedData
CreateBarCode(string, string, int, bool, int)
This method creates a string containing the data for a PNG image for a barcode for the given BarCodeText.
public static string CreateBarCode(string pBarCodeText, string pBarCodeType = "", int pHeight = 0, bool pAddText = false, int pBarWidthFactor = 0)
Parameters
pBarCodeText
stringThe text to create the Barcode form. A * character will be added to be begin/end of the barcode if not yet present.
pBarCodeType
stringThe type of barcode to create. Use '3of9' or 'code128'. Please use wikipedia for viewing the features of each barcode.
pHeight
intThe height in pixels of the barcode.
pAddText
boolA boolean indicating that the text of the barcode is to be added as well.
pBarWidthFactor
intThe widht in pixels of a thin bar.
Returns
- string
A string containing the binary data for the PNG image for this barcode
CreateINIpasswordKey(string)
This helper creates the slightly encrypted password for a database connection as can be used in PolarServer ini-files. It is better to use integrated security where possible.
public static string CreateINIpasswordKey(string pPassWord)
Parameters
pPassWord
stringThe database password
Returns
- string
A string with the encrypted database password as is used in PolarServer ini files.
CreateQRCode(string, int, int, string)
This method creates a string containing the data for a PNG image for a QR code for the given QRcodeText.
public static string CreateQRCode(string pQRcodeText, int pQRCodeTypeNumber = 0, int pBlockWidthFactor = 0, string pErrorCorrectionLevel = "")
Parameters
pQRcodeText
stringThe text to create the QR code for
pQRCodeTypeNumber
intThe type of QR code to create. This is basically the size. Use values 1-40 or 0 for automatic.
pBlockWidthFactor
intThe width/height of a single square.
pErrorCorrectionLevel
stringThe level of error-correction (L:low / M:medium / Q / H:high )
Returns
- string
A string containing the binary data for the PNG image for this QR code
DateToString(object, PolarTimeZone, bool)
This method formats a date to a string that matches the international settings for the user of the current context.
public string DateToString(object pDate, PolarTimeZone pTimeZone = null, bool pForceIncludeSeconds = false)
Parameters
pDate
objectThe Date to format. Can also be NULL
pTimeZone
PolarTimeZoneAn optional TimeZone to display the given pDate in. When supplied, the given pDate is treated as a UTC date/time.
pForceIncludeSeconds
boolWhen a time is given in pDate that has 00 as seconds and seconds are configured to be displayed, then only the HH:mm are shown. The boolean parameter pForceIncludeSeconds can be used to force displaying the seconds in this situation.
Returns
- string
A string with the representation of the given date/time in the provided timezone.
DecompressString(string)
This method will take a string that is the result of the CompressString method and decompress it to the original bytes.
public static string DecompressString(string pCompressedInputString)
Parameters
pCompressedInputString
stringA string as was the result of CompressString
Returns
- string
The original string.
DecryptHex(string, string)
This is a depricated helper to decrypt 16 digit encrypted data (64 bits) with a 16 digit hex key using the outdated des algorithm.
public static string DecryptHex(string pHexCode, string pKey)
Parameters
pHexCode
string16 digit hex containing the encrypted data.
pKey
stringA 16 digit hex key used to encrypt the data (although des used only a 56 bits key)
Returns
- string
16 digit hex data containing the decrypted result.
DecryptText(string, string)
This method decrypts an encrypted string that was created with the EncryptText method.
public static string DecryptText(string pEncryptedInputText, string pPassWord)
Parameters
pEncryptedInputText
stringThe string to decrypt.
pPassWord
stringThe password as was used for encryption.
Returns
- string
The decrypted string as was originally passed to EncryptString
EncryptHex(string, string)
This is a depricated helper to encrypt 16 digit data (64 bits) with a 16 digit hex key using the outdated des algorithm.
public static string EncryptHex(string pHexCode, string pKey)
Parameters
pHexCode
string16 digit hex containing the data to encrypt.
pKey
stringA 16 digit hex key used to encrypt the data (although des used only a 56 bits key)
Returns
- string
A 16 digit hex string containing the encrypted result.
EncryptText(string, string, bool, bool)
This method encrypts a string using the provided symetric password.
public static string EncryptText(string pInputText, string pPassWord, bool pReturnAsHex = false, bool pIsBinaryData = false)
Parameters
pInputText
stringThe string/data to encrypt
pPassWord
stringThe password for encryption.
pReturnAsHex
boolIf True, the result is a hex-string, when False, it is a binary string
pIsBinaryData
boolThis flag can be passed as True when binary data is to be encrypted. This prevents the step from converting unicode to binary which may (in case of binary data) result in incorrect decryption.
Returns
- string
The encrypted result in either hex-format (if pReturnAsHex = True) or as binary string.
EndMenu()
This method can only be used during the creation of a scripted menu. It will then end a menu started with BeginMenu.
public void EndMenu()
EscapeStringToJSON(string)
This method converts a string to JSON. No unicode conversions are applied. The result is NOT encapsulated in quotes.
public static string EscapeStringToJSON(string pString)
Parameters
pString
stringThe string to convert.
Returns
- string
The JSON representing the given string.
GetDirectory(string, Mode)
This method returns a PolarFileInfos object that contains the PolarFileInfo objects for all files/folder in a folder
public static PolarFileInfos GetDirectory(string pPathName, PolarFileInfos.Mode pMode = Mode.FilesOnly)
Parameters
pPathName
stringThe path to retrieve. Can contain wildcards, like 'c:\temp*.png'
pMode
PolarFileInfos.ModeThe operation mode: Default = 0 (Files only), FilesOnly = 1, FoldersOnly = 2, FilesAndFolders = 3
Returns
- PolarFileInfos
A PolarFileInfos object for the given folder.
GetDirectoryContents(string, int)
This method is for backwards compatibility only. Please use GetDirectory instead.
public static Collection GetDirectoryContents(string pPathName, int pAttributes = 0)
Parameters
pPathName
stringThe directoty to get
pAttributes
intThis parameter is not supported anymore (it is ignored) and is here only for backwards compatibility)
Returns
- Collection
A collection of arrays (FileName, DateTime, FileSize (bytes), Attributes). Attibutes: 0=normal; 1=ReadOnly; 2=Hidden; 4=System; 16=Directory; 32=Archive-bit
GetInternetDocument(string)
This method returns a document retrieved over HTTP. No errors will be raised if anything fails.
public static string GetInternetDocument(string pURL)
Parameters
pURL
stringThe URL of the document to retrieve. The url can start with a specific verb in brackets if wanted, like: (DELETE)https://MyApi.com/?GUID=1234.1234.1234.1234
Returns
- string
The contents of the document.
GetInternetDocument(string, ref string, string, Dictionary<string>, Dictionary<string>, int)
This method returns a document retrieved over HTTP.
public static string GetInternetDocument(string pURL, ref string pErrorMessage, string pPostData, Dictionary<string> pHeaders = null, Dictionary<string> pReturnedHeaders = null, int pTimeoutMs = 0)
Parameters
pURL
stringThe URL of the document to retrieve. The url can start with a specific verb in brackets if wanted, like: (DELETE)https://MyApi.com/?GUID=1234.1234.1234.1234
pErrorMessage
stringA by-ref parameter that will contain an error message if applicable.
pPostData
stringA string containing the Post-data. If provided, a POST will be executed instead of a GET.
pHeaders
Dictionary<string>If wanted, additional HTTP headers can be added to the request in this string parameter. Each header is like: HeaderName=HeaderValue. Headers must be on separate lines.
pReturnedHeaders
Dictionary<string>This by-ref parameter will be filled with the returned HTTP headers of the response. Each header is on a separate line in the format: HeaderName=HeaderValue
pTimeoutMs
intThe time (in miliseconds) to wait for a timeout. A value of 0 means wait infinitely.
Returns
- string
The contents of the document.
GetInternetDocument(string, ref string, string, int)
This method returns a document retrieved over HTTP.
public static string GetInternetDocument(string pURL, ref string pErrorMessage, string pPostData = "", int pTimeoutMs = 0)
Parameters
pURL
stringThe URL of the document to retrieve. The url can start with a specific verb in brackets if wanted, like: (DELETE)https://MyApi.com/?GUID=1234.1234.1234.1234
pErrorMessage
stringA by-ref parameter that will contain an error message if applicable.
pPostData
stringA string containing the Post-data. If provided, a POST will be executed instead of a GET.
pTimeoutMs
intThe time (in miliseconds) to wait for a timeout. A value of 0 means wait infinitely.
Returns
- string
The contents of the document.
GetInternetDocument(string, ref string, string, string, ref string, ref string, int)
This method returns a document retrieved over HTTP.
public static string GetInternetDocument(string pURL, ref string pErrorMessage, string pPostData, string pHeaders, ref string pReturnedHeaders, ref string pContentType_InOut, int pTimeoutMs = 0)
Parameters
pURL
stringThe URL of the document to retrieve. The url can start with a specific verb in brackets if wanted, like: (DELETE)https://MyApi.com/?GUID=1234.1234.1234.1234
pErrorMessage
stringA by-ref parameter that will contain an error message if applicable.
pPostData
stringA string containing the Post-data. If provided, a POST will be executed instead of a GET.
pHeaders
stringIf wanted, additional HTTP headers can be added to the request in this string parameter. Each header is like: HeaderName=HeaderValue. Headers must be on separate lines.
pReturnedHeaders
stringThis by-ref parameter will be filled with the returned HTTP headers of the response. Each header is on a separate line in the format: HeaderName=HeaderValue
pContentType_InOut
stringIf this parameter is provided, the content-type of the request will be set to this value. The returned by-ref value will be updated to the content-type of the response.
pTimeoutMs
intThe time (in miliseconds) to wait for a timeout. A value of 0 means wait infinitely.
Returns
- string
The contents of the document.
GetPerformanceCounter()
Returns the current value for the Performance counter. To determine how long an action takes, do as follows: lStartCounter = GetPerformanceCounter 'Do your actions SendDebug "This took " & ((GetPerformanceCounter - lStartCounter) / GetPerformanceCounterFrequency) & " seconds to run"
public static long GetPerformanceCounter()
Returns
GetPerformanceCounterFrequency()
Returns the number of 'counts' for one second as is used for GetPerformanceCounter.
public static long GetPerformanceCounterFrequency()
Returns
- long
10000000
HexToString(string)
This method converts a hex string to a binary string with characters representing the hex data.
public static string HexToString(string pInputHexString)
Parameters
pInputHexString
stringThe hex data
Returns
- string
A binary string
JSONstringToDateTime(string)
This helper is used to convert a JSON string to DateTime. JSON has no formal support for date/time values. The ValueToJSON method will convert Date variables to a string formatted 'yyyy-MM-ddTHH:mm:ss'
public static DateTime JSONstringToDateTime(string pJSONvalue)
Parameters
pJSONvalue
stringA string representing a date time.
Returns
- DateTime
The date/time.
NewChart()
This method returns a new PolarChart object
public static Chart NewChart()
Returns
- Chart
A PolarChart object
NewCustomForm()
This method returns a new CustomForm object.
public static CustomForm NewCustomForm()
Returns
- CustomForm
A new CustomForm object.
NewImage()
This method returns a new Image object for simple image functions with default properties.
public static Image NewImage()
Returns
- Image
A new Image object
NewImage(int, int, int)
This method returns a new Image object for simple image functions.
public static Image NewImage(int pWidth, int pHeight, int pBackgroundColor = 16777215)
Parameters
pWidth
intThe width of the image in pixels
pHeight
intThe height of the image in pixels
pBackgroundColor
intThe color of the background. You can use constants (like vbBlack, vbWhite, etc) or the RGB function.
Returns
NewPolarXMLdocument()
This method returns a new PolarXMLdocument. The PolarXMLdocument is a wrapper that allows code written for the Microsoft XML objects to work.
public static PolarXMLdocument NewPolarXMLdocument()
Returns
- PolarXMLdocument
A new PolarXMLdocument.
NewStringDictionary()
This method returns a new dictionary object that is typed to only contain strings.
public static Dictionary<string> NewStringDictionary()
Returns
- Dictionary<string>
A string-dictionary
NumberToString(double, int, bool)
This method formats a number to a string that matches the international settings for the user of the current context
public string NumberToString(double pNumber, int pDecimals = -1, bool pThousandsSeparators = false)
Parameters
pNumber
doubleThe Number to format. Can also be NULL
pDecimals
intThis parameter specifies the number of decimals to show. Use -1 to show the actual number of decimals contained in the passed number.
pThousandsSeparators
boolThis boolean parameter specifies if each set of 3 digits (the thousands) should be separated.
Returns
- string
A string representing the number given the provided number of decimals and the pThousandSeparators
OneTimePasswordHelper(string)
The method returns a OneTimePasswordHelper as can be used to validate one time passwords (TOTP) as created with authenticator apps
public static OneTimePassword OneTimePasswordHelper(string pKey = "")
Parameters
pKey
stringThe key to use for this OneTimePassword. If no key is provided, a new random key is used.
Returns
- OneTimePassword
A OneTimePassword object.
ParseJSON(string)
This method converts a unicode JSON string to objects. JSON arrays are returned as collections, JSON objects are returned as case-sensitive dictionaries. If parsing fails, Nothing will be returned, but no error will be raised.
public static object ParseJSON(string pJSONstring)
Parameters
pJSONstring
stringA valid JSON string
Returns
- object
A collection or dictionary object, depending on the JSON input.
ParseJSON(string, ref string)
This method converts a unicode JSON string to objects. JSON arrays are returned as collections, JSON objects are returned as case-sensitive dictionaries. If parsing fails, the by-ref parameter pErrorMessage will contain the error message.
public static object ParseJSON(string pJSONstring, ref string pError)
Parameters
pJSONstring
stringA valid JSON string
pError
stringThis by-ref parameter will be filled with the parsing-error if applicable.
Returns
- object
A collection or dictionary object, depending on the JSON input.
RemoveUnicodeCharactersFromString(string, string)
This method take a string and removes all unicode characters (characters that are not in the standard character set) by the given replacement character.
public static string RemoveUnicodeCharactersFromString(string pInputString, string pReplacementCharacter = "")
Parameters
pInputString
stringThe string to sanitize
pReplacementCharacter
stringThe character that will replace the unicode characters
Returns
- string
A string without unicode characters.
ReplaceParameters(string, params object[])
This method parses the given pInputText and replaces [%1], [%2] etc for the given parameters in pParametersArray.
public static string ReplaceParameters(string pInputText, params object[] pParametersArray)
Parameters
pInputText
stringThe string to process.
pParametersArray
object[]The parameters for position 1, 2, 3, etc.
Returns
ReplaceSqlParameters(Context, string, params object[])
This method parses the given SQL in pInputText and replaces [%1], [%2] etc for the given parameters in pParametersArray formatted as SQL.
public static string ReplaceSqlParameters(Context pContext, string pInputText, params object[] pParametersArray)
Parameters
pContext
ContextThe context to use.
pInputText
stringThe SQL formatted string to process.
pParametersArray
object[]The parameters for position 1, 2, 3, etc.
Returns
- string
A SQL string with the given [%1] etc replaced by the SQL representations of the given elements in pParametersArray
ReplaceSqlParameters(DataConnector, string, params object[])
This method parses the given SQL in pInputText and replaces [%1], [%2] etc for the given parameters in pParametersArray formatted as SQL.
public static string ReplaceSqlParameters(DataConnector pDataConnector, string pInputText, params object[] pParametersArray)
Parameters
pDataConnector
DataConnectorThe dataconnector to use for converting the values to SQL strings.
pInputText
stringThe SQL formatted string to process.
pParametersArray
object[]The parameters for position 1, 2, 3, etc.
Returns
- string
A SQL string with the given [%1] etc replaced by the SQL representations of the given elements in pParametersArray
ReplaceSqlParameters(string, params object[])
This method parses the given SQL in pInputText and replaces [%1], [%2] etc for the given parameters in pParametersArray formatted as SQL.
public string ReplaceSqlParameters(string pInputText, params object[] pParametersArray)
Parameters
pInputText
stringThe SQL formatted string to process.
pParametersArray
object[]The parameters for position 1, 2, 3, etc.
Returns
- string
A SQL string with the given [%1] etc replaced by the SQL representations of the given elements in pParametersArray
ReportChart()
This method can be access during the creation of the chart in a report. It can be used to do custom styling etc.
public object ReportChart()
Returns
- object
A reference to the chart that is being created.
ReportField(string, object)
This method can be access during the creation of reports only and will contain the value of the field with the given name.
public object ReportField(string pFieldName, object pDefaultValue = null)
Parameters
pFieldName
stringThe name of the field which value is to be retrieved or one of the following pseudo-fields: '%TotalsLevel' (0/1/2) '%AlternatingRow' (True/False), '%RowCount', '%SubRowCount', '%Name'/'%ReportName', '%Caption'/'%ReportCaption', '%Description'/'%ReportDescription', '%GroupIdentifier'
pDefaultValue
objectThe value to use when it is NULL
Returns
- object
The value of the requested field.
SendDebug(params object[])
This method sends the given parameters to the debug window in Polar Studio. After the line a linefeed is added.
public void SendDebug(params object[] pItems)
Parameters
pItems
object[]The items to display in the debug window
SendDebugNoLF(params object[])
This method sends the given parameters to the debug panel in Polar Studio. There will be no linefeed added to the line, allowing multiple elements to be printed on one line.
public void SendDebugNoLF(params object[] pItems)
Parameters
pItems
object[]The items to display in the debug window
SendMessage(string, bool, string, string, string, string, string, string, string, object, string, Context)
This method sends a message to a user that is shown in a popup in the browser.
public void SendMessage(string pMessage, bool pMessageIsHtmlFormatted = false, string pCaption = "", string pIconURL = "", string pOnOkScript = "", string pOnCancelScript = "", string pOkButtonCaption = "", string pCancelButtonCaption = "", string pStyle = "", object pReverseButtons = null, string pOnCloseScript = "", Context pContext = null)
Parameters
pMessage
stringThe message to send to the user.
pMessageIsHtmlFormatted
boolA boolean parameter indicating the passed message contains HTML. Only pass as true if your own code makes sure al variable data is converted to HTML.
pCaption
stringAn optional caption for the caption of the popup dialog
pIconURL
stringThe URL to use for the icon that is shown in the popup.
pOnOkScript
stringThe script-expression to execute server side when the users clicks the OK button. The expression can be preceeded by an exclamation-mark to run the given script-expression 'interactively'. When an expression is given that starts with a @, this expression is fired as javascript in the browser.
pOnCancelScript
stringThe Cancel button will be hidden if this parameter is empty. Use only a minus character to show the cancel button but to take no action. Else, this paramater contains the script-expression to execute server side when the users clicks the OK button. The expression can be preceeded by an exclamation-mark to run the given script-expression 'interactively'. When an expression is given that starts with a @, this expression is fired as javascript in the browser.
pOkButtonCaption
stringThe caption of the OK button if it should be differen than OK. Specify as '---' (3x minus) to completely hide the OK button.
pCancelButtonCaption
stringThe caption of the Cancel button if it should be differen than Cancel.
pStyle
stringA css-class that is applied to the elements in the Popup and that can be used to style popups using your custom CSS.
pReverseButtons
objectA boolean parameter to indicate that the OK and Cancel buttons must trade places (thus Cancel / OK)
pOnCloseScript
stringThe Close-cross button in the top-right corner of the dialog will be hidden if this parameter is empty. Use only a minus character to show the close button but to take no action. Else, this paramater contains the script-expression to execute server side when the users clicks the OK button. The expression can be preceeded by an exclamation-mark to run the given script-expression 'interactively'. When an expression is given that starts with a @, this expression is fired as javascript in the browser.
pContext
ContextA context to run the actions in. Especially important in multiple document interface applications.
StringHasUnicodeCharacters(string)
This boolean returns True if the given string contains characters that are not in the standard character set.
public static bool StringHasUnicodeCharacters(string pInputString)
Parameters
pInputString
stringThe string to test for unicode characters.
Returns
- bool
True if the given string contains unicode characters.
StringToByteArray(string)
This method will create a byte-array from the given binary string. Unicode characters will not (correctly) be converted.
public static byte[] StringToByteArray(string pString)
Parameters
pString
stringThe string to convert to a byte-array.
Returns
- byte[]
A byte array representing the given string.
StringToDate(string, PolarTimeZone)
This method takes a string and converts it to a data/time. It uses the international settings for the user of the current context. It also accepts expressions as '*' for today, '**' for now, '-3y' etc. An error will be raised if the conversion failed.
public DateTime StringToDate(string pInputString, PolarTimeZone pTimeZone = null)
Parameters
pInputString
stringThe string to convert to a date
pTimeZone
PolarTimeZoneIf a timezone is given, the given string is expected to be a local time in the given timezone and it is converted to a UTC date/time value.
Returns
- DateTime
A date/time value
StringToDate(string, ref string, PolarTimeZone)
This method takes a string and converts it to a data/time. It uses the international settings for the user of the current context. It also accepts expressions as '*' for today, '**' for now, '-3y' etc.
public DateTime StringToDate(string pInputString, ref string pErrorMessage, PolarTimeZone pTimeZone = null)
Parameters
pInputString
stringThe string to convert to a date
pErrorMessage
stringThis ByRef parameter contains an error message if the conversion failed.
pTimeZone
PolarTimeZoneIf a timezone is given, the given string is expected to be a local time in the given timezone and it is converted to a UTC date/time value.
Returns
- DateTime
A date/time value
StringToHex(string)
This method converts a binary string to hex. No conversion from unicode is made.
public static string StringToHex(string pInputString)
Parameters
pInputString
stringA binary string
Returns
- string
The hex code representing the given binary string.
StringToNumber(string)
This method takes a string and converts it to a number. It uses the international settings for the user of the current context. It will allways return a number and no error will be raised.
public double StringToNumber(string pInputString)
Parameters
pInputString
stringThe local string to convert to a number
Returns
- double
A double number.
SysDebug(string)
This method sends a message to the server console. These messages are not visible in PolarStudio in any way. Meant for internal use.
public static void SysDebug(string pMessage)
Parameters
pMessage
stringThe message to send to the console.
ValueToJSON(object)
This method converts any value to JSON. This method can be called with standard variable types, collections and dictionaries. No unicode conversions are applied to strings, thus the result will be a unicode string. If this string is stored or sent out in a non-unicode way, a UnicodeToUTF8 must be applied on this result.
public static string ValueToJSON(object pValue)
Parameters
pValue
objectThe value to convert to JSON
Returns
- string
A JSON string.
ValueToString(object)
This method take any object and converts it to a string as is used for the debugging Windows. Strings are returned as string, numbers are returned in technical format (decimal dot), dates in local format. Booleans as True/False, Nothing as [Nothing] and other objects as '[ObjectType]'.
public string ValueToString(object pValue)
Parameters
pValue
object
Returns
WriteLogLine(string, string, bool)
This method writes a line of text to a log (a text-file in the file-system)
public void WriteLogLine(string pLogMessage, string pFileName = "", bool pDoNotAddDateTime = false)
Parameters
pLogMessage
stringThe line of text to add to the log.
pFileName
stringThe name of the file to write to. Will be 'LogResults.txt' if left empty. If the file does not exists, it will be created.
pDoNotAddDateTime
boolBy default, each line is preceeded by a date/time stamp, unless this parameter is passed as True.