.NET Core版の初期化処理
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
単語検索
|
最終更新
|
ヘルプ
]
開始行:
「[[Open棟梁 wiki>https://opentouryo.osscons.jp]]」は、「...
-[[戻る>機能一覧 - 対応する処理方式と、そのサンプル#lc433...
--[[共通の初期化処理]]
--.NET Core版の初期化処理
*目次 [#w0fa0eca]
#contents
*概要 [#k3b33c11]
.NET Core対応で初期化処理が必要になった点が幾つかあるので...
*詳細 [#g4621cf0]
**共通 [#k0d5bb2d]
***GetConfigParameter [#n7221dba]
[[GetConfigParameterクラスで、appsettings.jsonを使用でき...
-ASP.NET Core
public Startup(IHostingEnvironment env, IConfiguration c...
{
...
// configの初期化
GetConfigParameter.InitConfiguration(config);
-ASP.NET Core以外
// configの初期化
GetConfigParameter.InitConfiguration("appsettings.json");
***... [#x01f4a01]
***その他 [#z67554d2]
テンプレートのProgram.csを参考にする。
-https://github.com/OpenTouryoProject/OpenTouryo/blob/dev...
**ASP.NET Core [#t10144e2]
***HttpContext.Current [#z3c9df05]
HttpContext.Currentを使用可能にする。
-Startup.Configure
// HttpContextのマイグレーション用
app._UseHttpContextAccessor();
-Startup.ConfigureServices
// HttpContextのマイグレーション用
services._AddHttpContextAccessor();
※ 利用の際は、
MyHttpContext.Current.Session
>等として利用する。
***カレント・ディレクトリ [#y1939e2f]
-ASP.NET Coreでは、[[Docker対応]]などで、相対パスを使用す...
-そこで、必要に応じて以下の様に、カレント・ディレクトリを...
// カレント・ディレクトリを変更する。
Directory.SetCurrentDirectory(Path.GetDirectoryName(Asse...
***... [#gdc7545b]
***その他 [#u3f15105]
テンプレートのProgram.csやStartup.csを参考にする。
-https://github.com/OpenTouryoProject/OpenTouryo/blob/dev...
-https://github.com/OpenTouryoProject/OpenTouryo/blob/dev...
終了行:
「[[Open棟梁 wiki>https://opentouryo.osscons.jp]]」は、「...
-[[戻る>機能一覧 - 対応する処理方式と、そのサンプル#lc433...
--[[共通の初期化処理]]
--.NET Core版の初期化処理
*目次 [#w0fa0eca]
#contents
*概要 [#k3b33c11]
.NET Core対応で初期化処理が必要になった点が幾つかあるので...
*詳細 [#g4621cf0]
**共通 [#k0d5bb2d]
***GetConfigParameter [#n7221dba]
[[GetConfigParameterクラスで、appsettings.jsonを使用でき...
-ASP.NET Core
public Startup(IHostingEnvironment env, IConfiguration c...
{
...
// configの初期化
GetConfigParameter.InitConfiguration(config);
-ASP.NET Core以外
// configの初期化
GetConfigParameter.InitConfiguration("appsettings.json");
***... [#x01f4a01]
***その他 [#z67554d2]
テンプレートのProgram.csを参考にする。
-https://github.com/OpenTouryoProject/OpenTouryo/blob/dev...
**ASP.NET Core [#t10144e2]
***HttpContext.Current [#z3c9df05]
HttpContext.Currentを使用可能にする。
-Startup.Configure
// HttpContextのマイグレーション用
app._UseHttpContextAccessor();
-Startup.ConfigureServices
// HttpContextのマイグレーション用
services._AddHttpContextAccessor();
※ 利用の際は、
MyHttpContext.Current.Session
>等として利用する。
***カレント・ディレクトリ [#y1939e2f]
-ASP.NET Coreでは、[[Docker対応]]などで、相対パスを使用す...
-そこで、必要に応じて以下の様に、カレント・ディレクトリを...
// カレント・ディレクトリを変更する。
Directory.SetCurrentDirectory(Path.GetDirectoryName(Asse...
***... [#gdc7545b]
***その他 [#u3f15105]
テンプレートのProgram.csやStartup.csを参考にする。
-https://github.com/OpenTouryoProject/OpenTouryo/blob/dev...
-https://github.com/OpenTouryoProject/OpenTouryo/blob/dev...
ページ名: