Beispiel #1
0
 public MvxCommandBase()
 {
     if (!Mvx.TryResolve <IMvxCommandHelper>(out _commandHelper))
     {
         _commandHelper = new MvxWeakCommandHelper();
     }
 }
        public MvxCommandBase()
        {
            if (!Mvx.TryResolve <IMvxCommandHelper>(out _commandHelper))
            {
                _commandHelper = new MvxWeakCommandHelper();
            }

            var alwaysOnUIThread = MvxSingletonCache.Instance == null || MvxSingletonCache.Instance.Settings.AlwaysRaiseInpcOnUserInterfaceThread;

            ShouldAlwaysRaiseCECOnUserInterfaceThread = alwaysOnUIThread;
        }
Beispiel #3
0
        public MvxCommandBase()
        {
            // fallback on MvxWeakCommandHelper if no IoC has been set up
            if (!Mvx.IoCProvider?.TryResolve(out _commandHelper) ?? true)
            {
                _commandHelper = new MvxWeakCommandHelper();
            }

            // default to true if no Singleton Cache has been set up
            var alwaysOnUIThread = MvxSingletonCache.Instance?.Settings.AlwaysRaiseInpcOnUserInterfaceThread ?? true;

            ShouldAlwaysRaiseCECOnUserInterfaceThread = alwaysOnUIThread;
        }
Beispiel #4
0
#pragma warning disable CS8618 // Non-nullable field is uninitialized. Consider declaring as nullable.
        public MvxCommandBase()
#pragma warning restore CS8618 // Non-nullable field is uninitialized. Consider declaring as nullable.
        {
            // fallback on MvxWeakCommandHelper if no IoC has been set up
            if (!Mvx.IoCProvider?.TryResolve(out _commandHelper) ?? true)
            {
                _commandHelper = new MvxWeakCommandHelper();
            }

            // default to true if no Singleton Cache has been set up
            var alwaysOnUIThread = MvxSingletonCache.Instance?.Settings.AlwaysRaiseInpcOnUserInterfaceThread ?? true;

            ShouldAlwaysRaiseCECOnUserInterfaceThread = alwaysOnUIThread;
        }
        public MvxCommandBase()
        {
            if (!Mvx.TryResolve<IMvxCommandHelper>(out _commandHelper))
                _commandHelper = new MvxWeakCommandHelper();

            var alwaysOnUIThread = (MvxSingletonCache.Instance == null)
                                       ? true
                                       : MvxSingletonCache.Instance.Settings.AlwaysRaiseInpcOnUserInterfaceThread;
            ShouldAlwaysRaiseCECOnUserInterfaceThread = alwaysOnUIThread;
        }
Beispiel #6
0
 public MvxCommandBase()
 {
     if (!Mvx.TryResolve<IMvxCommandHelper>(out _commandHelper))
         _commandHelper = new MvxWeakCommandHelper();
 }