public static void FireWidgetFunctionAddedEvent(WidgetFunctionsAddedEventArgs widgetFunctionsAddedEventArgs) { lock (_lock) { if (_widgetFunctionsAddedEvent != null) { WidgetFunctionsAddedEventDelegate widgetFunctionsAddedEvent = _widgetFunctionsAddedEvent; widgetFunctionsAddedEvent(widgetFunctionsAddedEventArgs); } } }