ArtemisComm.Proxy.UI.SQLLogger.Extensions.UIThreadGetValue C# (CSharp) Метод

UIThreadGetValue() приватный Метод

private UIThreadGetValue ( this me, DependencyProperty dp ) : object
me this
dp System.Windows.DependencyProperty
Результат object
        public static object UIThreadGetValue(this DependencyObject me, DependencyProperty dp)
        {
            object retVal = null;
            if (me != null)
            {
                if (Application.Current.Dispatcher != System.Windows.Threading.Dispatcher.CurrentDispatcher)
                {
                    retVal = Application.Current.Dispatcher.Invoke(
                        new Func<DependencyProperty, object>(me.GetValue), dp);

                }
                else
                {
                    retVal = me.GetValue(dp);

                }
            }
            else
            {
                retVal = null;
            }
            return retVal;

        }