예제 #1
0
        protected override void Dispose(bool isDisposing)
        {
            base.Dispose(isDisposing);

            if (!isDisposing)
            {
                return;
            }

            _subscription?.Dispose();
        }
예제 #2
0
        public void DisposeWeakEventSubscription_OnDisposedObject_DoesNotThrow()
        {
            var disposableClass = new DisposableClass();

            var subscription = new MvxWeakEventSubscription <DisposableClass>(disposableClass, "TestEvent", (s, e) =>
            {
            });

            disposableClass.Dispose();
            subscription.Dispose();
        }
 public void Include(MvxWeakEventSubscription <object, EventArgs> subscription)
 {
     typeof(object).GetEvent("");
     subscription = new MvxWeakEventSubscription <object, EventArgs>(null, "", null);
     subscription.Dispose();
 }