protected virtual void Show(FrameworkElement element, MvxViewModelRequest request) { var attribute = GetPresentationAttributes(element); if (!AttributeTypesToShowMethodDictionary.TryGetValue(attribute.GetType(), out Action <FrameworkElement, MvxBasePresentationAttribute, MvxViewModelRequest> showAction)) { throw new KeyNotFoundException($"The type {attribute.GetType().Name} is not configured in the presenter dictionary"); } showAction.Invoke(element, attribute, request); }
public virtual void Show(IMvxIosView view, MvxViewModelRequest request) { var viewController = view as UIViewController; var attribute = GetPresentationAttributes(viewController); var attributeType = attribute.GetType(); if (AttributeTypesToShowMethodDictionary.TryGetValue(attributeType, out Action <UIViewController, MvxBasePresentationAttribute, MvxViewModelRequest> showAction)) { showAction.Invoke(viewController, attribute, request); return; } throw new KeyNotFoundException($"The type {attributeType.Name} is not configured in the presenter dictionary"); }