-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConvertDataTableToHtmlTableAction.cs
More file actions
36 lines (29 loc) · 1.56 KB
/
Copy pathConvertDataTableToHtmlTableAction.cs
File metadata and controls
36 lines (29 loc) · 1.56 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
// ---------------------------------------------------
// Copyright (c) Jesus Fernandez. All Rights Reserved.
// ---------------------------------------------------
using System.Data;
using System.Diagnostics.CodeAnalysis;
using Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK;
using Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK.Attributes;
namespace PowerAutomate.Desktop.Modules.HTML.Actions;
[Action(Id = "ConvertDataTableToHtmlTable")]
[Throws(ErrorCodes.Unknown)]
[SuppressMessage("ReSharper", "AutoPropertyCanBeMadeGetOnly.Global", Justification = "PowerAutomate.Desktop.Module.Action")]
[SuppressMessage("ReSharper", "MemberCanBePrivate.Global", Justification = "PowerAutomate.Desktop.Module.Action")]
[SuppressMessage("ReSharper", "UnusedAutoPropertyAccessor.Global", Justification = "PowerAutomate.Desktop.Module.Action")]
[SuppressMessage("ReSharper", "ClassNeverInstantiated.Global", Justification = "PowerAutomate.Desktop.Module.Action")]
[SuppressMessage("ReSharper", "UnusedType.Global", Justification = "PowerAutomate.Desktop.Module.Action")]
public class ConvertDataTableToHtmlTableAction : HtmlActionBase
{
public ConvertDataTableToHtmlTableAction()
{
}
internal ConvertDataTableToHtmlTableAction(HtmlActionsContext context) : base(context)
{
}
[InputArgument]
public DataTable DataTable { get; set; } = null!;
[OutputArgument]
public string HtmlTable { get; set; } = null!;
protected override void Run(ActionContext context) => HtmlTable = Context.MarkupService.ConvertDataTableToHtmlTable(DataTable);
}