protected override void Dispose(bool isDisposing) { base.Dispose(isDisposing); if (!isDisposing) { return; } _subscription?.Dispose(); }
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(); }