C# Class Hexon.MvcTrig.TriggerContext

显示文件 Open project: dinowang/MvcTrig Class Usage Examples

Public Methods

Method Description
Add ( string name, object data, bool lowPiority = false ) : void
AsAjaxTrigger ( ) : TriggerContext

強迫採用 AJAX 機制 (HTTP header)

Clear ( ) : void

清除目前的所有 trigger 指令

Flush ( ) : void

將所有 trigger 命令送出

Parent ( Action call ) : TriggerContext

切換 Trigger 的操作範圍到父視窗

Reload ( ) : TriggerContext

重新載入本頁

Top ( Action call ) : TriggerContext

切換 Trigger 的操作範圍到頂層視窗

Private Methods

Method Description
AjaxTrigger ( IEnumerable commands ) : void

Ajax Trigger 透過 HTTP header 傳遞,所以就算 ActionResult 是回傳 JSON 也沒問題

PageTrigger ( IEnumerable commands ) : void

非 Ajax Trigger 透過 JavaScript 發動

TriggerContext ( HttpContext context ) : System
TriggerContext ( HttpContext context, TriggerContext copyFrom ) : System

Method Details

Add() public method

public Add ( string name, object data, bool lowPiority = false ) : void
name string
data object
lowPiority bool
return void

AsAjaxTrigger() public method

強迫採用 AJAX 機制 (HTTP header)
public AsAjaxTrigger ( ) : TriggerContext
return TriggerContext

Clear() public method

清除目前的所有 trigger 指令
public Clear ( ) : void
return void

Flush() public method

將所有 trigger 命令送出
public Flush ( ) : void
return void

Parent() public method

切換 Trigger 的操作範圍到父視窗
public Parent ( Action call ) : TriggerContext
call Action
return TriggerContext

Reload() public method

重新載入本頁
public Reload ( ) : TriggerContext
return TriggerContext

Top() public method

切換 Trigger 的操作範圍到頂層視窗
public Top ( Action call ) : TriggerContext
call Action
return TriggerContext