public MvxPageAdapter(IMvxEventSourcePage eventSource) : base(eventSource) { if (!(eventSource is IMvxPage)) { throw new ArgumentException("eventSource", "eventSource should be a IMvxPage"); } }
public MvxBasePageAdapter(IMvxEventSourcePage eventSource) { if (eventSource == null) { throw new ArgumentException("eventSource - eventSource should not be null"); } if (!(eventSource is Page)) { throw new ArgumentException("eventSource - eventSource should be a Page"); } _eventSource = eventSource; _eventSource.AppearingCalled += HandleAppearingCalled; _eventSource.DisappearingCalled += HandleDisappearingCalled; _eventSource.BindingContextChangedCalled += HandleBindingContextChangedCalled; _eventSource.ParentSetCalled += HandleParentSetCalled; }
public static void AdaptForBinding(this IMvxEventSourcePage page) { var adapter = new MvxPageAdapter(page); }