protected virtual void RaiseAfterProjectFileOpened(bool added) { // Save event in temporary variable to avoid race condition. EventHandler<ProjectFileOpenedEventArgs> tempEvent = this.ProjectFileOpened; if(tempEvent != null) { tempEvent(this, new ProjectFileOpenedEventArgs(added)); } }