チェンジセット 1609 (default)
- 日時:
- 2023/09/11 20:42:48 (13ヵ月前)
- 場所:
- framework/trunk/WebLibrary/Sources
- ファイル:
-
- 2個の更新
凡例:
- 未変更
- 追加
- 削除
-
framework/trunk/WebLibrary/Sources/ResourceUtility.cs
r864 r1609 26 26 using System.ComponentModel; 27 27 using System.Globalization; 28 using System.IO; 28 29 using System.Reflection; 29 30 using System.Resources; … … 68 69 /// <paramref name="resourceKeyWithLocation"/> が <see langword="null"/> 参照です。 69 70 /// </exception> 71 /// <exception cref="MissingManifestResourceException"> 72 /// 使用できるリソースのセットが見つからず、既定のカルチャ リソースもありません。 73 /// </exception> 74 /// <exception cref="MissingSatelliteAssemblyException"> 75 /// 既定のカルチャのリソースがサテライト アセンブリに存在し、そのサテライト アセンブリが見つかりませんでした。 76 /// </exception> 77 /// <exception cref="FileNotFoundException"> 78 /// アセンブリが見つかりません。 79 /// </exception> 80 /// <exception cref="FileLoadException"> 81 /// 見つかったファイルを読み込むことができませんでした。 82 /// </exception> 83 /// <exception cref="BadImageFormatException"> 84 /// アセンブリが有効なアセンブリではありません。 85 /// または 現在、Version 2.0 以降の共通言語ランタイムが読み込まれていますが、 86 /// それよりも新しいバージョンを使用してアセンブリがコンパイルされています。 87 /// </exception> 70 88 public static object GetResourceObject(string resourceKeyWithLocation, CultureInfo uiCulture, string defaultLocation) 71 89 { … … 119 137 /// <paramref name="resourceKey"/> が <see langword="null"/> 参照です。 120 138 /// </exception> 139 /// <exception cref="MissingManifestResourceException"> 140 /// 使用できるリソースのセットが見つからず、既定のカルチャ リソースもありません。 141 /// </exception> 142 /// <exception cref="MissingSatelliteAssemblyException"> 143 /// 既定のカルチャのリソースがサテライト アセンブリに存在し、そのサテライト アセンブリが見つかりませんでした。 144 /// </exception> 145 /// <exception cref="FileNotFoundException"> 146 /// アセンブリが見つかりません。 147 /// </exception> 148 /// <exception cref="FileLoadException"> 149 /// 見つかったファイルを読み込むことができませんでした。 150 /// </exception> 151 /// <exception cref="BadImageFormatException"> 152 /// アセンブリが有効なアセンブリではありません。 153 /// または 現在、Version 2.0 以降の共通言語ランタイムが読み込まれていますが、 154 /// それよりも新しいバージョンを使用してアセンブリがコンパイルされています。 155 /// </exception> 121 156 public static object GetResourceObject(string location, string resourceKey, CultureInfo uiCulture) 122 157 { … … 132 167 } 133 168 134 if (location.StartsWith("~/" ))169 if (location.StartsWith("~/", StringComparison.Ordinal)) 135 170 { 136 171 // 先頭が ~/ で始まっている場合はそのまま 137 172 } 138 else if (!location.StartsWith("/" ))173 else if (!location.StartsWith("/", StringComparison.Ordinal)) 139 174 { 140 175 int parsePosition; -
framework/trunk/WebLibrary/Sources/UI/WebControls/Localize.cs
r1276 r1609 275 275 } 276 276 277 TemplateControl templateControl = TemplateControl; 278 279 // ReSharper disable ExceptionNotDocumented 277 280 string newText 278 281 = ResourceUtility.GetResourceObject( 279 282 resourceKey, 280 283 CultureInfo.CurrentUICulture, 281 Page != null ? Page.Request.AppRelativeCurrentExecutionFilePath : null) as string;282 284 templateControl != null ? templateControl.AppRelativeVirtualPath : null) as string; 285 // ReSharper restore ExceptionNotDocumented 283 286 if (newText != null) 284 287 {
※ 詳しい使い方は
TracChangeset を参照してください。