public virtual Incident createIncident(IncidentContext context, string message) { IncidentEntity newIncident = IncidentEntity.createAndInsertIncident(type, context, message); if (!string.ReferenceEquals(context.ExecutionId, null)) { newIncident.createRecursiveIncidents(); } return(newIncident); }
protected internal virtual void removeIncident(IncidentContext context, bool incidentResolved) { IList <Incident> incidents = Context.CommandContext.IncidentManager.findIncidentByConfiguration(context.Configuration); foreach (Incident currentIncident in incidents) { IncidentEntity incident = (IncidentEntity)currentIncident; if (incidentResolved) { incident.resolve(); } else { incident.delete(); } } }
public virtual void deleteIncident(IncidentContext context) { removeIncident(context, false); }
public virtual void resolveIncident(IncidentContext context) { removeIncident(context, true); }
public virtual Incident handleIncident(IncidentContext context, string message) { return(createIncident(context, message)); }