/// <summary> /// Escreve os dados para XML. /// </summary> /// <param name="writer"></param> void System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter writer) { writer.WriteAttributeString("xmlns", "i", null, Namespaces.SchemaInstance); writer.WriteAttributeString("xmlns", "q", null, Namespaces.Query); writer.WriteAttributeString("ActionId", ActionId.ToString()); writer.WriteAttributeString("Type", Type.ToString()); writer.WriteAttributeString("EntityFullName", EntityFullName); writer.WriteAttributeString("ProviderName", ProviderName ?? ""); writer.WriteAttributeString("RowVersion", (RowVersion.HasValue) ? RowVersion.ToString() : ""); writer.WriteAttributeString("CommandTimeout", CommandTimeout.ToString()); writer.WriteStartElement("Parameters", Namespaces.Data); if (Parameters != null) { foreach (System.Xml.Serialization.IXmlSerializable parameter in Parameters) { writer.WriteStartElement("Parameter", Namespaces.Data); parameter.WriteXml(writer); writer.WriteEndElement(); } } writer.WriteEndElement(); writer.WriteStartElement("Conditional"); if (Conditional != null) { ((System.Xml.Serialization.IXmlSerializable)Conditional).WriteXml(writer); } writer.WriteEndElement(); writer.WriteStartElement("AlternativeActions"); foreach (System.Xml.Serialization.IXmlSerializable action in AlternativeActions) { writer.WriteStartElement("PersistenceAction", Namespaces.Data); action.WriteXml(writer); writer.WriteEndElement(); } writer.WriteEndElement(); writer.WriteStartElement("BeforeActions"); foreach (System.Xml.Serialization.IXmlSerializable action in BeforeActions) { writer.WriteStartElement("PersistenceAction", Namespaces.Data); action.WriteXml(writer); writer.WriteEndElement(); } writer.WriteEndElement(); writer.WriteStartElement("AfterActions"); foreach (System.Xml.Serialization.IXmlSerializable action in AfterActions) { writer.WriteStartElement("PersistenceAction", Namespaces.Data); action.WriteXml(writer); writer.WriteEndElement(); } writer.WriteEndElement(); WriteItem <Colosoft.Query.StoredProcedureName>(writer, "StoredProcedureName", _storedProcedureName ?? Colosoft.Query.StoredProcedureName.Empty); writer.WriteStartElement("Query"); if (Query != null) { ((System.Xml.Serialization.IXmlSerializable)Query).WriteXml(writer); } writer.WriteEndElement(); }
public override string ToString() { return(ActionId.ToString()); }
private bool IsIdsMatch(IPostAction templateDefinedPostAction) { if (templateDefinedPostAction.ActionId != ActionId) { string errorMsg = string.Format(StringRes.PostActionIdsNotMatchError, templateDefinedPostAction.ActionId.ToString(), ActionId.ToString(), RelatedTemplate); if (!ContinueOnError) { throw new Exception(errorMsg); } else { AppHealth.Current.Error.TrackAsync(errorMsg).FireAndForget(); return(false); } } return(true); }
public Task <bool> ExecuteActionAsync(ActionId actionId, CancellationToken cancellationToken = default) => ExecuteActionAsync(actionId.ToString(), cancellationToken);
void System.Xml.Serialization.IXmlSerializable.WriteXml(System.Xml.XmlWriter writer) { writer.WriteAttributeString("ActionId", ActionId.ToString()); writer.WriteAttributeString("Success", Success.ToString()); writer.WriteAttributeString("AffectedRows", AffectedRows.ToString()); writer.WriteAttributeString("RowVersion", RowVersion.ToString()); writer.WriteStartElement("FailureMessage"); if (!string.IsNullOrEmpty(FailureMessage)) { writer.WriteValue(FailureMessage); } writer.WriteEndElement(); writer.WriteStartElement("Result"); if (Result != null) { writer.WriteValue(Result); } writer.WriteEndElement(); writer.WriteStartElement("Parameters", Namespaces.Data); if (Parameters != null) { foreach (System.Xml.Serialization.IXmlSerializable parameter in Parameters) { writer.WriteStartElement("Parameter", Namespaces.Data); if (parameter != null) { parameter.WriteXml(writer); } writer.WriteEndElement(); } } writer.WriteEndElement(); writer.WriteStartElement("AlternativeActions", Namespaces.Data); foreach (System.Xml.Serialization.IXmlSerializable parameter in AlternativeActions) { writer.WriteStartElement("PersistenceActionResult", Namespaces.Data); if (parameter != null) { parameter.WriteXml(writer); } writer.WriteEndElement(); } writer.WriteEndElement(); writer.WriteStartElement("BeforeActions", Namespaces.Data); foreach (System.Xml.Serialization.IXmlSerializable parameter in BeforeActions) { writer.WriteStartElement("PersistenceActionResult", Namespaces.Data); if (parameter != null) { parameter.WriteXml(writer); } writer.WriteEndElement(); } writer.WriteEndElement(); writer.WriteStartElement("AfterActions", Namespaces.Data); foreach (System.Xml.Serialization.IXmlSerializable parameter in AfterActions) { writer.WriteStartElement("PersistenceActionResult", Namespaces.Data); if (parameter != null) { parameter.WriteXml(writer); } writer.WriteEndElement(); } writer.WriteEndElement(); }