예제 #1
0
 /// <summary>
 /// Presents a controller of the specified type.
 /// </summary>
 /// <typeparam name="TController">Type of the controller to instantiate.</typeparam>
 /// <typeparam name="TResult">Type of the controller result value.</typeparam>
 /// <param name="presenter">The presenter.</param>
 /// <param name="args">Controller arguments.</param>
 /// <param name="options">Present options.</param>
 /// <returns>An object that can be used to track the operation progress.</returns>
 /// <exception cref="ArgumentException">Thrown if <typeparamref name="TController"/> cannot be used to instantiate the controller (for instance it is abstract type).</exception>
 /// <exception cref="InvalidCastException">Thrown if the <typeparamref name="TResult"/> does not match result type of the <typeparamref name="TController"/>.</exception>
 /// <exception cref="ObjectDisposedException">Thrown if the presenter is disposed.</exception>
 public static Task <TResult> PresentAsync <TController, TResult>(this IPresenter presenter, PresentArgs args, PresentOptions options) where TController : IViewController, IViewControllerResult <TResult>
 {
     return(((IPresentResultOf <TController, TResult>)presenter.Present(typeof(TController), args, options, null)).Task);
 }
예제 #2
0
 /// <summary>
 /// Presents a controller of the specified type.
 /// </summary>
 /// <typeparam name="TController">Type of the controller to instantiate.</typeparam>
 /// <typeparam name="TResult">Type of the controller result value.</typeparam>
 /// <param name="presenter">The presenter.</param>
 /// <param name="args">Controller arguments.</param>
 /// <returns>An object that can be used to track the operation progress.</returns>
 /// <exception cref="ArgumentException">Thrown if <typeparamref name="TController"/> cannot be used to instantiate the controller (for instance it is abstract type).</exception>
 /// <exception cref="InvalidCastException">Thrown if the <typeparamref name="TResult"/> does not match result type of the <typeparamref name="TController"/>.</exception>
 /// <exception cref="ObjectDisposedException">Thrown if the presenter is disposed.</exception>
 public static IPresentResultOf <TController, TResult> Present <TController, TResult>(this IPresenter presenter, PresentArgs args) where TController : IViewController, IViewControllerResult <TResult>
 {
     return((IPresentResultOf <TController, TResult>)presenter.Present(typeof(TController), args, PresentOptions.None, null));
 }
예제 #3
0
 /// <summary>
 /// Presents a controller of the specified type.
 /// </summary>
 /// <typeparam name="TController">Type of the controller to instantiate.</typeparam>
 /// <param name="presenter">The presenter.</param>
 /// <param name="options">Present options.</param>
 /// <param name="transform">Parent transform of the controller view.</param>
 /// <param name="args">Controller arguments.</param>
 /// <returns>An object that can be used to track the operation progress.</returns>
 /// <exception cref="ArgumentException">Thrown if <typeparamref name="TController"/> cannot be used to instantiate the controller (for instance it is abstract type).</exception>
 /// <exception cref="ObjectDisposedException">Thrown if the presenter is disposed.</exception>
 public static Task PresentAsync <TController>(this IPresenter presenter, PresentArgs args, PresentOptions options, Transform transform) where TController : IViewController
 {
     return(presenter.Present(typeof(TController), args, options, transform).Task);
 }
예제 #4
0
 /// <summary>
 /// Presents a controller of the specified type.
 /// </summary>
 /// <typeparam name="TController">Type of the controller to instantiate.</typeparam>
 /// <param name="presenter">The presenter.</param>
 /// <param name="options">Present options.</param>
 /// <param name="transform">Parent transform of the controller view.</param>
 /// <param name="args">Controller arguments.</param>
 /// <returns>An object that can be used to track the operation progress.</returns>
 /// <exception cref="ArgumentException">Thrown if <typeparamref name="TController"/> cannot be used to instantiate the controller (for instance it is abstract type).</exception>
 /// <exception cref="ObjectDisposedException">Thrown if the presenter is disposed.</exception>
 public static IPresentResultOf <TController> Present <TController>(this IPresenter presenter, PresentArgs args, PresentOptions options, Transform transform) where TController : IViewController
 {
     return((IPresentResultOf <TController>)presenter.Present(typeof(TController), args, options, transform));
 }
예제 #5
0
 /// <summary>
 /// Presents a controller of the specified type.
 /// </summary>
 /// <typeparam name="TController">Type of the controller to instantiate.</typeparam>
 /// <param name="presenter">The presenter.</param>
 /// <param name="args">Controller arguments.</param>
 /// <returns>An object that can be used to track the operation progress.</returns>
 /// <exception cref="ArgumentException">Thrown if <typeparamref name="TController"/> cannot be used to instantiate the controller (for instance it is abstract type).</exception>
 /// <exception cref="ObjectDisposedException">Thrown if the presenter is disposed.</exception>
 public static Task PresentAsync <TController>(this IPresenter presenter, PresentArgs args) where TController : IViewController
 {
     return(presenter.Present(typeof(TController), args, PresentOptions.None, null).Task);
 }
예제 #6
0
 /// <summary>
 /// Presents a controller of the specified type.
 /// </summary>
 /// <param name="presenter">The presenter.</param>
 /// <param name="controllerType">Type of the view controller to present.</param>
 /// <param name="args">Controller arguments.</param>
 /// <param name="options">Present options.</param>
 /// <param name="transform">Parent transform of the controller view.</param>
 /// <returns>An object that can be used to track the operation progress.</returns>
 /// <exception cref="ArgumentNullException">Thrown if <paramref name="controllerType"/> is <see langword="null"/>.</exception>
 /// <exception cref="ArgumentException">Thrown if <paramref name="controllerType"/> cannot be used to instantiate the controller (for instance it is abstract type).</exception>
 /// <exception cref="ObjectDisposedException">Thrown if the presenter is disposed.</exception>
 /// <seealso cref="Present(Type)"/>
 public static Task PresentAsync(this IPresenter presenter, Type controllerType, PresentArgs args, PresentOptions options, Transform transform)
 {
     return(presenter.Present(controllerType, args, options, transform).Task);
 }