Add event-driven quick action dispatch
This commit is contained in:
@@ -8,31 +8,31 @@ namespace F4SD.ActionConnector.Models
|
||||
{
|
||||
public abstract class ActionDefinitionBase
|
||||
{
|
||||
public string Id { get; set; }
|
||||
public string Id { get; internal set; }
|
||||
public abstract ActionType Type { get; }
|
||||
public bool AwaitResult { get; set; }
|
||||
public bool IsEnabled { get; set; }
|
||||
public string Description { get; set; }
|
||||
public bool AwaitResult { get; internal set; }
|
||||
public bool IsEnabled { get; internal set; }
|
||||
public string Description { get; internal set; }
|
||||
public bool IsValid { get; private protected set; }
|
||||
|
||||
protected ActionDefinitionBase(XmlElement xNode, cXmlParser parser)
|
||||
{
|
||||
try
|
||||
{
|
||||
Id = cXmlParser.GetStringFromXmlAttribute(xNode, "Id");
|
||||
AwaitResult = cXmlParser.GetBoolFromXmlAttribute(xNode, "AwaitResult");
|
||||
IsEnabled = cXmlParser.GetBoolFromXmlAttribute(xNode, "IsEnabled");
|
||||
|
||||
XmlNode descriptionNode = xNode.SelectSingleNode("Description");
|
||||
if (descriptionNode != null)
|
||||
Description = cXmlParser.GetInnerTextFromXmlElement(descriptionNode);
|
||||
|
||||
IsValid = true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogException(ex);
|
||||
}
|
||||
{
|
||||
try
|
||||
{
|
||||
Id = cXmlParser.GetStringFromXmlAttribute(xNode, "Id");
|
||||
AwaitResult = cXmlParser.GetBoolFromXmlAttribute(xNode, "AwaitResult");
|
||||
IsEnabled = cXmlParser.GetBoolFromXmlAttribute(xNode, "IsEnabled");
|
||||
|
||||
XmlNode descriptionNode = xNode.SelectSingleNode("Description");
|
||||
if (descriptionNode != null)
|
||||
Description = cXmlParser.GetInnerTextFromXmlElement(descriptionNode);
|
||||
|
||||
IsValid = true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogException(ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user