public MvxCellAdapter(IMvxEventSourceCell eventSource) : base(eventSource) { if (!(eventSource is IMvxCell)) { throw new ArgumentException("eventSource", "eventSource should be a IMvxCell"); } }
public MvxBaseCellAdapter(IMvxEventSourceCell eventSource) { if (eventSource == null) { throw new ArgumentException("eventSource - eventSource should not be null"); } if (!(eventSource is Cell)) { throw new ArgumentException("eventSource - eventSource should be a Cell"); } _eventSource = eventSource; _eventSource.AppearingCalled += HandleAppearingCalled; _eventSource.DisappearingCalled += HandleDisappearingCalled; _eventSource.TappedCalled += HandleTappedCalled; _eventSource.BindingContextChangedCalled += HandleBindingContextChangedCalled; _eventSource.ParentSetCalled += HandleParentSetCalled; }
public static void AdaptForBinding(this IMvxEventSourceCell cell) { var adapter = new MvxCellAdapter(cell); }