-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNewLineConstant.cs
29 lines (29 loc) · 984 Bytes
/
NewLineConstant.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
using DevExpress.XtraReports.Expressions;
using System;
namespace CustomFunctionForExpressionEditorExample
{
public class NewLineConstant : ReportCustomFunctionOperatorBase
{
public override string FunctionCategory
=> "String";
public override string Description
=> "NewLineConstant()\r\nInserts a new line.";
public override bool IsValidOperandCount(int count)
=> count == 0;
public override bool IsValidOperandType(int operandIndex, int operandCount, Type type)
=> true;
public override int MaxOperandCount => 0;
public override int MinOperandCount
=> -1;
public override object Evaluate(params object[] operands)
{
return Environment.NewLine;
}
public override string Name
=> "NewLineConstant";
public override Type ResultType(params Type[] operands)
{
return typeof(string);
}
}
}