AjaxHandlerFactory の GetHandler メソッドで、最終的に ActionHandler が作成されます。これは HttpHandler であり、パイプラインの 15 番目のステップで呼び出されます (ブログ [Asp.net で独自のサービス フレームワークを作成する] のシーケンスを引用) 。
注: AjaxHandlerFactory の GetHandler メソッドはステップ 10 で呼び出されます。ステップ 12 ではセッションを準備しています (非インプロセス モード)。そのため、セッションの使用はステップ 12 の前に決定する必要があります。
すべてのアクション コードは ActionHandler で実行されます:
internal class ActionHandler : IHttpHandler{ internal InvokeInfo InvokeInfo; public void ProcessRequest(HttpContext context) { // 调用核心的工具类,执行Action ActionExecutor.ExecuteAction(context, this.InvokeInfo); }
ExecuteAction の実装プロセスは次のとおりです:
internal static void ExecuteAction(HttpContext context, InvokeInfo vkInfo) { if( context == null ) throw new ArgumentNullException("context"); if( vkInfo == null ) throw new ArgumentNullException("vkInfo"); // 调用方法 object result = ExecuteActionInternal(context, vkInfo); // 设置OutputCache OutputCacheAttribute outputCache = vkInfo.GetOutputCacheSetting(); if( outputCache != null ) outputCache.SetResponseCache(context); // 处理方法的返回结果 IActionResult executeResult = result as IActionResult; if( executeResult != null ) { executeResult.Ouput(context); } else { if( result != null ) { // 普通类型结果 context.Response.ContentType = "text/plain"; context.Response.Write(result.ToString()); } } }internal static object ExecuteActionInternal(HttpContext context, InvokeInfo info) { // 准备要传给调用方法的参数 object[] parameters = GetActionCallParameters(context, info.Action); // 调用方法 if( info.Action.HasReturn ) return info.Action.MethodInfo.Invoke(info.Instance, parameters); else { info.Action.MethodInfo.Invoke(info.Instance, parameters); return null; } }
SetResponseCache() を呼び出すタイミングについては前に述べましたよね? このタイミングは、まさにアクションの実行後です。 。
OutputCache を設定したら、戻り値を処理します。
前のコードには、別の重要な呼び出しがあります:
// 准备要传给调用方法的参数object[] parameters = GetActionCallParameters(context, info.Action);
[関連推奨事項]
1。特別な推奨事項: 「php Programmer Toolbox」V0.1 バージョンのダウンロード
3. 4.MyMVCボックスでアクションを見つけるプロセスの詳細な説明
5..NET MyMVCフレームワークが戻り値を処理します。チュートリアル
6. メソッドに値を割り当てる方法に関する以上が.NET MyMVCフレームワークでアクションを実行するプロセスの詳細な説明の詳細内容です。詳細については、PHP 中国語 Web サイトの他の関連記事を参照してください。

DJI has not confirmed any plans to introduce a new action camera yet. Instead, it seems that GoPro will get ahead of its rival this year, having teased that it will introduce two new action cameras on September 4. For context, these are expected to a

Almost a year has passed since DJI released the Osmo Action 4 (curr. $299 on Amazon). Since then, the company has focused on its other divisions, including new RS camera gimbals. On top of that, it has introduced various drones as well like the Avata

Insta360hasreleasedanewactioncamera,itssecondoftheyearaftertheInsta360X4(curr.$499.99onAmazon).Asexpected,thecompanyhasintroducedtheGo3S,anupgradedthatGo3thatadds4Kvideorecordingcapabilities.Specifically,whileInst

某些情况,我们希望在Vuex中进行一些异步操作, 比如网络请求, 必然是异步的,这个时候怎么处理呢?下面就给大家介绍Vuex状态管理之Action异步操作,希望对需要的朋友有所帮助!

GoPro has now introduced its annual action camera refresh. Unlike in recent years, the company has decided to release two models. However, it has not returned to 360-degree cameras, despite teasing this time last year that it would replace the Max wi

elasticsearch中的绝大部分操作都是通过相应的action,这些action在action包中。它的结构如下图所示:上图是action包的部分截图,这里面对应着各个功能的action。各个action的包也都非常类似于index。这些action的实现也非常类似,都是基础自action,下图是indexaction的继承关系:因为这些action并未真正实现相应的功能,只是一个代理,因此实现上也非常简单。他们的主要作用是提供新建response和request的方法及对应的action

Details of a completely new GoPro action camera has leaked online alongside equivalent information about the Hero 13 Black. Please note that the information contained below is said to originate from an Amazon US listing that has since now been remove

The Amazfit GTR 3 Pro Limited Edition is currently on sale at Amazon for just $124.99, down 40% from its list price of $209.99. Compared to the standard version that has an aluminum case, the Amazfit GTR 3 Pro Limited Edition uses hand-polished stain


ホットAIツール

Undresser.AI Undress
リアルなヌード写真を作成する AI 搭載アプリ

AI Clothes Remover
写真から衣服を削除するオンライン AI ツール。

Undress AI Tool
脱衣画像を無料で

Clothoff.io
AI衣類リムーバー

AI Hentai Generator
AIヘンタイを無料で生成します。

人気の記事

ホットツール

EditPlus 中国語クラック版
サイズが小さく、構文の強調表示、コード プロンプト機能はサポートされていません

Safe Exam Browser
Safe Exam Browser は、オンライン試験を安全に受験するための安全なブラウザ環境です。このソフトウェアは、あらゆるコンピュータを安全なワークステーションに変えます。あらゆるユーティリティへのアクセスを制御し、学生が無許可のリソースを使用するのを防ぎます。

mPDF
mPDF は、UTF-8 でエンコードされた HTML から PDF ファイルを生成できる PHP ライブラリです。オリジナルの作者である Ian Back は、Web サイトから「オンザフライ」で PDF ファイルを出力し、さまざまな言語を処理するために mPDF を作成しました。 HTML2FPDF などのオリジナルのスクリプトよりも遅く、Unicode フォントを使用すると生成されるファイルが大きくなりますが、CSS スタイルなどをサポートし、多くの機能強化が施されています。 RTL (アラビア語とヘブライ語) や CJK (中国語、日本語、韓国語) を含むほぼすべての言語をサポートします。ネストされたブロックレベル要素 (P、DIV など) をサポートします。

SublimeText3 Mac版
神レベルのコード編集ソフト(SublimeText3)

MantisBT
Mantis は、製品の欠陥追跡を支援するために設計された、導入が簡単な Web ベースの欠陥追跡ツールです。 PHP、MySQL、Web サーバーが必要です。デモおよびホスティング サービスをチェックしてください。

ホットトピック



