private void FireStudiesCleared(StudyAimAnnotationClearedEventArgs e)
 {
     if (!_disposed)
     {
         EventsHelper.Fire(_studiesCleared, this, e);
     }
 }
 private void OnStudiesCleared(object sender, StudyAimAnnotationClearedEventArgs args)
 {
     if (_synchronizationContext != null)
     {
         _synchronizationContext.Post(ignore => FireStudiesCleared(args), null);
     }
     else
     {
         FireStudiesCleared(args);
     }
 }
        private void OnStudiesCleared(object sender, EventArgs args)
        {
            var studyList = AimCache.Instance.ClearCache();

            if (!studyList.Any())
            {
                return;
            }

            IList <Delegate> delegates;

            lock (_syncLock)
            {
                delegates = _studiesCleared != null?_studiesCleared.GetInvocationList() : new Delegate[0];
            }

            if (delegates.Count > 0)
            {
                var clearedEvent = new StudyAimAnnotationClearedEventArgs(studyList);
                CallDelegates(delegates, clearedEvent);
            }
        }
 private void OnStudiesCleared(object sender, StudyAimAnnotationClearedEventArgs args)
 {
     if (_synchronizationContext != null)
         _synchronizationContext.Post(ignore => FireStudiesCleared(args), null);
     else
         FireStudiesCleared(args);
 }
 private void FireStudiesCleared(StudyAimAnnotationClearedEventArgs e)
 {
     if (!_disposed)
         EventsHelper.Fire(_studiesCleared, this, e);
 }
        private void OnStudiesCleared(object sender, EventArgs args)
        {
            var studyList = AimCache.Instance.ClearCache();

            if (!studyList.Any())
                return;

            IList<Delegate> delegates;
            lock (_syncLock)
            {
                delegates = _studiesCleared != null ? _studiesCleared.GetInvocationList() : new Delegate[0];
            }

            if (delegates.Count > 0)
            {
                var clearedEvent = new StudyAimAnnotationClearedEventArgs(studyList);
                CallDelegates(delegates, clearedEvent);
            }
        }