C# Class Antaris.AspNetCore.Mvc.Widgets.Infrastructure.DefaultWidgetInvoker

Provides a default implementation of a widget invoker.
Inheritance: IWidgetInvoker
Afficher le fichier Open project: Antaris/AspNetCore.Mvc.Widgets

Méthodes publiques

Méthode Description
DefaultWidgetInvoker ( ITypeActivatorCache typeActivatorCache, IWidgetActivator widgetActivator, IWidgetArgumentBinder argumentBinder ) : System

Initialises a new instance of DefaultWidgetInvoker.

Invoke ( WidgetContext context ) : void
InvokeAsync ( WidgetContext context ) : System.Threading.Tasks.Task

Private Methods

Méthode Description
CoerceToWidgetResult ( object value ) : IWidgetResult

Coerces the output result of a widget to a IWidgetResult given that a method could return anything.

CreateWidget ( WidgetContext context ) : object

Creates a widget instance.

GetArgumentsAsync ( WidgetContext context, MethodInfo method, RouteValueDictionary values ) : Task

Gets the arguments for the target method.

The argument binder will provide a mixed-result of values from the provided dictionary, and those from model binding.

InvokeAsyncCore ( MethodInfo method, WidgetContext context ) : Task

Invokes an asynchronous method.

InvokeSyncCore ( MethodInfo method, WidgetContext context ) : IWidgetResult

Invokes a synchronous method.

Method Details

DefaultWidgetInvoker() public méthode

Initialises a new instance of DefaultWidgetInvoker.
public DefaultWidgetInvoker ( ITypeActivatorCache typeActivatorCache, IWidgetActivator widgetActivator, IWidgetArgumentBinder argumentBinder ) : System
typeActivatorCache ITypeActivatorCache The type activator cache.
widgetActivator IWidgetActivator The widget activator.
argumentBinder IWidgetArgumentBinder The widget argument binder.
Résultat System

Invoke() public méthode

public Invoke ( WidgetContext context ) : void
context WidgetContext
Résultat void

InvokeAsync() public méthode

public InvokeAsync ( WidgetContext context ) : System.Threading.Tasks.Task
context WidgetContext
Résultat System.Threading.Tasks.Task