Microsoft userCSharp XSL Functoids for BizTalk and Azure Integration Accounts

Microsoft userCSharp XSL Functoids for BizTalk and Azure Integration Accounts

If you've ever worked with Microsoft BizTalk, Enterprise Intergration on Azure (i.e. an Azure Integration Account), or any other kind of XSLT files associated with other Microsoft products, then you're probably familiar with the userCSharp namespace and functoids. There doesn't appear to be any official documentation online, so I've compiled a list of the functoids below as a reference sheet for anyone interested in what the namespace has to offer.

The namespace is referenced as shown below:

xmlns:userCSharp="http://schemas.microsoft.com/BizTalk/2003/userCSharp"

Conversion Functoids

ConvertAsc

Converts the first character of a string to its ASCII value.

ConvertAsc(string val)

ConvertChr

Converts an ASCII value to its character representation.

ConvertChr(string val)

ConvertHex

Converts a numeric value to its hexadecimal value.

ConvertHex(string val)

ConvertOct

Converts a numeric value to its octal value.

ConvertOct(string val)

Cumulative Functoids

InitCumulative

Initializes a cumulative calculation.

Number

InitCumulativeSum(int index)
InitComulativeAvg(int index)
InitCumulativeMin(int index)
InitCumulativeMax(int index)

String

InitCumulativeConcat(int index)

AddToCumulative

Adds a value to a cumulative calculation.

Number

AddToCumulativeSum(int index, string val, string notused)
AddToCumulativeAvg(int index, string val, string notused)
AddToCumulativeMin(int index, string val, string notused)
AddToCumulativeMax(int index, string val, string notused)

String

AddToCumulativeConcat(int index, string val, string notused)

GetCumulative

Retrieves the cumulative calculation.

Number

GetCumulativeSum(int index)
GetCumulativeAvg(int index)
GetCumulativeMin(int index)
GetCumulativeMax(int index)

String

GetCumulativeConcat(int index)

String Functoids

StringFind

Reports the one-based index of the first occurrence of the specified string value (strFind) within the instance (str).

StringFind(string str, string strFind)

StringLeft

Returns a substring of str with the length of count beginning from the left.

StringLeft(string str, string count)

StringRight

Returns a substring of str with the length of count beginning from the right.

StringRight(string str, string count)

StringLowerCase

Converts a string to lower case.

StringLowerCase(string str)

StringUpperCase

Converts a string to upper case.

StringUpperCase(string str)

StringSize

Returns the length of a string.

StringSize(string str)

StringSubstring

Returns a substring of the instance of a string.

StringSubstring(string str, string left, string right)

StringConcat

Concatenates strings (up to 4).

StringConcat(string param0, string param1)
StringConcat(string param0, string param1, string param2)
StringConcat(string param0, string param1, string param2, string param3)
StringConcat(string param0, string param1, string param2, string param3, string param4)

StringTrimLeft

Removes all leading whitespace from the string instance.

StringTrimLeft(string str)

StringTrimRight

Removes all trailing whitespace from the string instance.

StringTrimRight(string str)

Scientific Functoids

SciArcTan

Returns the angle whose tangent is the specified number (arctangent).

SciArcTan(string val)

SciCos

Returns the cosine of the specified angle.

SciCos(string val)

SciPow

Returns a specified number raised to the specified power.

SciPow(string val1, string val2)

SciSin

Returns the sine of the specified angle.

SciSin(string val)

SciTan

Returns the tangent of the specified angle.

SciTan(string val)

SciExp

Returns e raised to the specified power.

SciExp(string val)

SciLog

Returns the logarithm of a specified number.

SciLog(string val)

SciExp10

Returns 10 raised to the specified power.

SciExp10(string val)

SciLog10

Returns the base 10 logarithm of a specified number.

SciLog10(string val)

SciLogn

Returns log(n) of the specified number (val1) and n (val2).

SciLogn(string val1, string val2)

MathAbs

Returns the absolute value of a specified number.

MathAbs(string val)

MathInt

Converts a specified numeric value to an integer.

MathInt(string val)

MathMax

Returns the maximum of two numeric values.

MathMax(string param0, string param1)

MathMin

Returns the minimum of two numeric values.

MathMin(string param0, string param1)

MathMod

Returns the modulo of a numeric value by a denominator.

MathMod(string val, string denominator)

MathRound

Rounds a value to the nearest integer or to the specified number of fractional digits.

MathRound(string val)
MathRound(string val, string decimals)

MathSqrt

Returns the square root of a specified number.

MathSqrt(string val)

MathAdd

Conductions addition against a series of numeric values.

MathAdd(string param0, string param1)
MathAdd(string param0, string param1, string param2)
MathAdd(string param0, string param1, string param2, string param3)
MathAdd(string param0, string param1, string param2, string param3, string param4)

MathSubtract

Conducts subtraction against a series of numeric values.

MathSubtract(string param0, string param1)
MathSubtract(string param0, string param1, string param2)
MathSubtract(string param0, string param1, string param2, string param3)
MathSubtract(string param0, string param1, string param2, string param3, string param4)

MathMultiply

Conducts multiplication against a series of numeric values.

MathMultiply(string param0, string param1)
MathMultiply(string param0, string param1, string param2)
MathMultiply(string param0, string param1, string param2, string param3)
MathMultiply(string param0, string param1, string param2, string param3, string param4)

MathDivide

Conducts division of two numeric values.

MathDivide(string val1, string val2)

DateTime Functoids

DateCurrentDate

Returns the current date in the format yyyy-MM-dd.

DateCurrentDate()

DateCurrentTime

Returns the current time in the format HH:mm:ss.

DateCurrentTime()

DateAddDays

Returns a new datetime value that adds the specified number of days to the value of this instance.

DateAddDays(string date, string days)

DateCurrentDateTime

Returns the current datetime in the format yyyy-MM-ddTHH:mm:ss.

DateCurrentDateTime()

IsDate

Tests whether the given value is formatted as a datetime value.

IsDate(string val)

Logical Functoids

LogicalGt, LogicalGte, LogicalLt, LogicalLte, LogicalEq, LogicalNe

If both values are numeric, conducts a numeric comparison of the values and otherwise conducts a comparison of the values based on ordinal position.

LogicalGt(string val1, string val2)
LogicalGte(string val1, string val2)
LogicalLt(string val1, string val2)
LogicalLte(string val1, string val2)
LogicalEq(string val1, string val2)
LogicalNe(string val1, string val2)

LogicalIsString

Tests whether the value is neither null nor an empty string.

LogicalIsString(string val)

LogicalIsDate

Functions identical to IsDate.

LogicalIsDate(string val)

LogicalIsNumeric

Tests whether the value is a numeric value.

LogicalIsNumeric(string val)

LogicalOr

Logical "or." Values are converted to boolean equivalents.

LogicalOr(string param0, string param1)
LogicalOr(string param0, string param1, string param2)
LogicalOr(string param0, string param1, string param2, string param3)
LogicalOr(string param0, string param1, string param2, string param3, string param4)

LogicalAnd

Logical "and." Values are converted to boolean equivalents.

LogicalAnd(string param0, string param1)
LogicalAnd(string param0, string param1, string param2)
LogicalAnd(string param0, string param1, string param2, string param3)
LogicalAnd(string param0, string param1, string param2, string param3, string param4)

LogicalExistence

Converts a value to its boolean equivalent.

LogicalExistence(bool val)

LogicalNot

Converts a value to the inversion of its boolean equivalent.

LogicalNot(string val)