зеркало из https://github.com/microsoft/MIMWAL.git
Adding CR() Function
This commit is contained in:
Родитель
22304489ad
Коммит
bee41eb020
|
@ -1293,6 +1293,11 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Common
|
|||
/// </summary>
|
||||
public const int ExpressionFunctionIndexByValue = 11687;
|
||||
|
||||
/// <summary>
|
||||
/// The event identifier for ExpressionFunction CR events
|
||||
/// </summary>
|
||||
public const int ExpressionFunctionCr = 11688;
|
||||
|
||||
/// <summary>
|
||||
/// The event identifier for LookupEvaluator Constructor events
|
||||
/// </summary>
|
||||
|
@ -2753,6 +2758,11 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Common
|
|||
/// </summary>
|
||||
public const int ExpressionFunctionCrlfInvalidFunctionParameterCountError = 41658;
|
||||
|
||||
/// <summary>
|
||||
/// The event identifier for ExpressionFunction CR events
|
||||
/// </summary>
|
||||
public const int ExpressionFunctionCrInvalidFunctionParameterCountError = 41658;
|
||||
|
||||
/// <summary>
|
||||
/// The event identifier for ExpressionFunction EscapeDNComponent events
|
||||
/// </summary>
|
||||
|
|
|
@ -168,6 +168,9 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Common
|
|||
case "CREATESQLPARAMETER2":
|
||||
return this.CreateSqlParameter2();
|
||||
|
||||
case "CR":
|
||||
return this.CR();
|
||||
|
||||
case "CRLF":
|
||||
return this.CRLF();
|
||||
|
||||
|
@ -4897,6 +4900,42 @@ namespace MicrosoftServices.IdentityManagement.WorkflowActivityLibrary.Common
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This function is used to generate a Carriage Return.
|
||||
/// Function Syntax: CR()
|
||||
/// </summary>
|
||||
/// <returns>A CR is the output.</returns>
|
||||
private string CR()
|
||||
{
|
||||
Logger.Instance.WriteMethodEntry(EventIdentifier.ExpressionFunctionCr, "Evaluation Mode: '{0}'.", this.mode);
|
||||
|
||||
try
|
||||
{
|
||||
if (this.parameters.Count != 0)
|
||||
{
|
||||
throw Logger.Instance.ReportError(EventIdentifier.ExpressionFunctionCrInvalidFunctionParameterCountError, new InvalidFunctionFormatException(Messages.ExpressionFunction_InvalidFunctionParameterCountError, this.function, 0, this.parameters.Count));
|
||||
}
|
||||
|
||||
string result;
|
||||
|
||||
if (this.mode != EvaluationMode.Parse)
|
||||
{
|
||||
result = "\n";
|
||||
Logger.Instance.WriteVerbose(EventIdentifier.ExpressionFunctionCr, "CR() returned '{0}'.", result);
|
||||
}
|
||||
else
|
||||
{
|
||||
result = null;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
finally
|
||||
{
|
||||
Logger.Instance.WriteMethodExit(EventIdentifier.ExpressionFunctionCr, "Evaluation Mode: '{0}'.", this.mode);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This function is used to generate a Carriage Return/Line Feed.
|
||||
/// Function Syntax: CRLF()
|
||||
|
|
Загрузка…
Ссылка в новой задаче