-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHtmlActionBase.cs
More file actions
36 lines (29 loc) · 952 Bytes
/
Copy pathHtmlActionBase.cs
File metadata and controls
36 lines (29 loc) · 952 Bytes
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;
using Microsoft.PowerPlatform.PowerAutomate.Desktop.Actions.SDK;
namespace PowerAutomate.Desktop.Modules.HTML.Actions;
public abstract class HtmlActionBase : ActionBase
{
protected HtmlActionBase() : this(HtmlActionsContext.CreateDefault())
{
}
protected HtmlActionBase(HtmlActionsContext context)
{
Context = context ?? throw new ArgumentNullException(nameof(context));
}
protected HtmlActionsContext Context { get; }
public override void Execute(ActionContext context)
{
try
{
Run(context);
}
catch (Exception ex)
{
throw new ActionException(ErrorCodes.Unknown, ex.Message, ex);
}
}
protected abstract void Run(ActionContext context);
}