private static void CallbackInternal(object state) { var behavior = (DelayBindingBehavior)state; if (behavior._context == null) { ToolkitExtensions.InvokeOnUiThreadAsync(behavior.Callback); } else { behavior._context.Post(CallbackDelegate, state); } }
private static void CallbackInternal(object state) { var behavior = (DelayBindingBehavior)((WeakReference)state).Target; if (behavior == null) { return; } if (behavior._context == null) { ToolkitExtensions.InvokeOnUiThreadAsync(behavior.Callback); } else { behavior._context.Post(CallbackDelegate, behavior); } }