protected virtual void OnRaiseCustomEvent(DataRetrieverEventArgs e) { // Make a temporary copy of the event to avoid possibility of a race condition EventHandler <DataRetrieverEventArgs> handler = DataRetrieveCompleted; // Event will be null if there are no subscribers if (handler != null) { handler(this, e); } }
protected virtual void OnRaiseCustomEvent(DataRetrieverEventArgs e) { // Make a temporary copy of the event to avoid possibility of a race condition EventHandler<DataRetrieverEventArgs> handler = DataRetrieveCompleted; // Event will be null if there are no subscribers if (handler != null) { handler(this, e); } }