コード例 #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));
 }