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

Provides a default implementation of a widget invoker.
Inheritance: IWidgetInvoker
ファイルを表示 Open project: Antaris/AspNetCore.Mvc.Widgets

Public Methods

Method 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

Method 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 method

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.
return System

Invoke() public method

public Invoke ( WidgetContext context ) : void
context WidgetContext
return void

InvokeAsync() public method

public InvokeAsync ( WidgetContext context ) : System.Threading.Tasks.Task
context WidgetContext
return System.Threading.Tasks.Task