コード例 #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();
        }
コード例 #3
0
 public void Include(MvxWeakEventSubscription <object, EventArgs> subscription)
 {
     typeof(object).GetEvent("");
     subscription = new MvxWeakEventSubscription <object, EventArgs>(null, "", null);
     subscription.Dispose();
 }