예제 #1
0
        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);
        }
예제 #2
0
        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();
                }
            }
        }
예제 #3
0
 public virtual void deleteIncident(IncidentContext context)
 {
     removeIncident(context, false);
 }
예제 #4
0
 public virtual void resolveIncident(IncidentContext context)
 {
     removeIncident(context, true);
 }
예제 #5
0
 public virtual Incident handleIncident(IncidentContext context, string message)
 {
     return(createIncident(context, message));
 }