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