public void DisposeWeakEventSubscription_OnDisposedObject_DoesNotThrow() { var disposableClass = new DisposableClass(); var subscription = new MvxWeakEventSubscription <DisposableClass>(disposableClass, "TestEvent", (s, e) => { }); disposableClass.Dispose(); subscription.Dispose(); }
public override void SubscribeToEvents() { var datePicker = View; if (datePicker == null) { MvxBindingTrace.Trace(MvxTraceLevel.Error, "Error - UIDatePicker is null in MvxBaseUIDatePickerTargetBinding"); } // Only listen for value changes if we are binding against one of the value-derived properties. else if (TargetPropertyInfo.Name == nameof(UIDatePicker.Date) || TargetPropertyInfo.Name == nameof(UIDatePicker.CountDownDuration)) { _subscription = datePicker.WeakSubscribe(nameof(datePicker.ValueChanged), DatePickerOnValueChanged); } }
public void Include(MvxWeakEventSubscription <string, string> weak) { var x = weak.GetType(); }
public void Include(MvxWeakEventSubscription <object, EventArgs> subscription) { typeof(object).GetEvent(""); subscription = new MvxWeakEventSubscription <object, EventArgs>(null, "", null); subscription.Dispose(); }
public void Include(MvxWeakEventSubscription <RecyclerView, RecyclerView> @event) { @event.WeakSubscribe(null, null); }
public void Include <TFirst, TSecond> (MvxWeakEventSubscription <TFirst, TSecond> weakSubscription) where TFirst : class { weakSubscription = new MvxWeakEventSubscription <TFirst, TSecond>(null, null, null); }