C# 클래스 Flatwhite.WebApi.WebApiPhoenix

A web api phoenix to support auto refresh for webApi

It will create instance of WebApi controller and invoke the ActionMethod with cached arguments. It will not work if the controller required QueryString, Headers or anything outside these action method parameters But you can override the Phoenix MethodInfo, Arguments or method Phoenix.GetTargetInstance, Phoenix.InvokeAndGetBareResult, or completely change the way the Phoenix reborn by overriding method , Phoenix.Reborn, Idealy, keep Controller thin and use proper Model binding instead of dodgy access the Request object.

상속: Flatwhite.Hot.Phoenix
파일 보기 프로젝트 열기: vanthoainguyen/Flatwhite 1 사용 예제들

공개 메소드들

메소드 설명
WebApiPhoenix ( _IInvocation invocation, WebApiCacheItem cacheItem, HttpRequestMessage originalRequestMessage ) : System

Initializes a WebApiPhoenix

보호된 메소드들

메소드 설명
FireAsync ( ) : Task

Send a http request with special header to loop back address to by pass the cache

GetTargetInstance ( ICacheDependencyScope scope ) : object

Not support in WebAPI

비공개 메소드들

메소드 설명
CloneRequestMessage ( HttpRequestMessage requestMessage ) : HttpRequestMessage
GetHttpClient ( ) : IHttpClient

메소드 상세

FireAsync() 보호된 메소드

Send a http request with special header to loop back address to by pass the cache
protected FireAsync ( ) : Task
리턴 Task

GetTargetInstance() 보호된 메소드

Not support in WebAPI
protected GetTargetInstance ( ICacheDependencyScope scope ) : object
scope ICacheDependencyScope
리턴 object

WebApiPhoenix() 공개 메소드

Initializes a WebApiPhoenix
public WebApiPhoenix ( _IInvocation invocation, WebApiCacheItem cacheItem, HttpRequestMessage originalRequestMessage ) : System
invocation _IInvocation
cacheItem WebApiCacheItem This should the the WebApiCacheItem instance
originalRequestMessage System.Net.Http.HttpRequestMessage
리턴 System