forked from tslab-hub/handlers
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathTextHandler.cs
More file actions
37 lines (34 loc) · 1.42 KB
/
TextHandler.cs
File metadata and controls
37 lines (34 loc) · 1.42 KB
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
30
31
32
33
34
35
36
37
using System;
using System.Collections.Generic;
using System.ComponentModel;
using TSLab.Script.Handlers.Options;
namespace TSLab.Script.Handlers
{
[HandlerCategory(HandlerCategories.TradeMath)]
[HelperName("Text", Language = Constants.En)]
[HelperName("Текст", Language = Constants.Ru)]
[InputsCount(0)]
[Description("Блок без входов. Содержит редактируемый строковый параметр, который будет возвращаться из блока в качестве результата его работы.")]
[HelperDescription("This block has no entries. It has an editable text parameter which returns as a result of its work.", Constants.En)]
public sealed class TextHandler : IValuesHandler, IStringReturns, ICustomListValues
{
/// <summary>
/// \~english Text (string)
/// \~russian Текст (строка)
/// </summary>
[HelperName("Text", Constants.En)]
[HelperName("Текст", Constants.Ru)]
[Description("Текст (строка)")]
[HelperDescription("Text (string)", Constants.En)]
[HandlerParameter(Default = "*")]
public string Text { get; set; }
public string Execute()
{
return Text;
}
public IEnumerable<string> GetValuesForParameter(string paramName)
{
return new[] { Text };
}
}
}