/// <summary> /// Adds the given activation span to the event, in which it's /// supposed to be active. /// </summary> /// <param name="span"></param> public void AddActivationSpan(ActivationSpan span) { lock (_activationSpans) _activationSpans.Add(span); var now = DateTime.Now; // Active time if (now >= span.Start && now < span.End) { this.Start(); } // Inactive time else { this.End(); } }