もしそうなら; どこで入手できますか?
2 に答える
2
ピーター、セッションへのアクセスを一元化したほうがいいです。
public class SessionStateBag
{
private static string SessionPropertyXKey = "SessionPropertyX";
public static int SessionPropertyX
{
get { return Session[SessionPropertyXKey]; }
set { Session[SessionPropertyXKey] = value; }
}
private static string SessionPropertyYKey = "SessionPropertyY";
public static string SessionPropertyY
{
get { return Session[SessionPropertyYKey]; }
set { Session[SessionPropertyYKey] = value; }
}
// etc. Try to guess the type of the session property. If you cannot guess it; use object.
}
コードの残りの部分で、Session["xxx"] を上記の SessionStateBag のプロパティの 1 つに置き換えます。
これには 1 日か 2 日かかる場合がありますが、すべてのセッションに 1 か所でアクセスできるようになり、Session オブジェクトが作成する迷路の中で洞察を得ることができます。
于 2010-04-26T18:13:44.053 に答える
2
Codeproject からこれを試しましたか? リファレンスをMicrosoft.VisualStudio.DebuggerVisualizers
バージョン 9.0 から 10.0 に修正した後、vs2010 で動作しました。
インストールフォルダは次のとおりです。
C:\Program files\Microsoft Visual Studio 10.0\Common7\Packages\Debugger\Visualizers
于 2010-10-25T09:56:57.460 に答える