次の方法で共有


StronglyTypedResourceBuilder.Create メソッド

定義

入力パラメーターで指定されているリソースと一致する、厳密に型指定されたプロパティが含まれるクラス ファイルを生成します。

オーバーロード

Create(IDictionary, String, String, CodeDomProvider, Boolean, String[])

指定されたコレクションで参照されたリソースと一致する、厳密に型指定されたプロパティが含まれるクラス ファイルを生成します。

Create(String, String, String, CodeDomProvider, Boolean, String[])

指定された .resx ファイルのリソースに一致する厳密に型指定されたプロパティを格納するクラス ファイルを生成します。

Create(IDictionary, String, String, String, CodeDomProvider, Boolean, String[])

指定されたコレクションで参照されたリソースと一致する、厳密に型指定されたプロパティが含まれるクラス ファイルを生成します。

Create(String, String, String, String, CodeDomProvider, Boolean, String[])

指定された .resx ファイルのリソースに一致する厳密に型指定されたプロパティを格納するクラス ファイルを生成します。

Create(IDictionary, String, String, CodeDomProvider, Boolean, String[])

指定されたコレクションで参照されたリソースと一致する、厳密に型指定されたプロパティが含まれるクラス ファイルを生成します。

public:
 static System::CodeDom::CodeCompileUnit ^ Create(System::Collections::IDictionary ^ resourceList, System::String ^ baseName, System::String ^ generatedCodeNamespace, System::CodeDom::Compiler::CodeDomProvider ^ codeProvider, bool internalClass, [Runtime::InteropServices::Out] cli::array <System::String ^> ^ % unmatchable);
public static System.CodeDom.CodeCompileUnit Create (System.Collections.IDictionary resourceList, string baseName, string generatedCodeNamespace, System.CodeDom.Compiler.CodeDomProvider codeProvider, bool internalClass, out string[] unmatchable);
public static System.CodeDom.CodeCompileUnit Create (System.Collections.IDictionary resourceList, string baseName, string? generatedCodeNamespace, System.CodeDom.Compiler.CodeDomProvider codeProvider, bool internalClass, out string[]? unmatchable);
static member Create : System.Collections.IDictionary * string * string * System.CodeDom.Compiler.CodeDomProvider * bool * String[] -> System.CodeDom.CodeCompileUnit
Public Shared Function Create (resourceList As IDictionary, baseName As String, generatedCodeNamespace As String, codeProvider As CodeDomProvider, internalClass As Boolean, ByRef unmatchable As String()) As CodeCompileUnit

パラメーター

resourceList
IDictionary

各ディクショナリ エントリのキーと値のペアがリソースの名前とリソースの値である IDictionary コレクション。

baseName
String

生成するクラスの名前。

generatedCodeNamespace
String

生成するクラスの名前空間。

codeProvider
CodeDomProvider

クラスが生成される言語を提供する CodeDomProvider クラス。

internalClass
Boolean

内部クラスを生成する場合は true。パブリック クラスを生成する場合は false

unmatchable
String[]

プロパティを生成できない各リソース名が含まれる配列。 通常、プロパティが生成できないのは、リソース名が有効な識別子ではないためです。

戻り値

CodeCompileUnit コンテナー。

例外

resourceListbasename、または codeProvidernull です。

リソース ノード名が resourceList のそのキーと一致しません。

注釈

メソッドを Create 使用して、 パラメーターに含まれるリソースにアクセスするための厳密に型指定された読み取り専用ラッパーを提供するクラスを resourceList 生成します。

クラスは StronglyTypedResourceBuilder 、"$" または>> "" の文字で始まるリソース名を無視します。 リソース名 "Culture" と "ResourceManager" は無効な識別子です。

適用対象

Create(String, String, String, CodeDomProvider, Boolean, String[])

指定された .resx ファイルのリソースに一致する厳密に型指定されたプロパティを格納するクラス ファイルを生成します。

public:
 static System::CodeDom::CodeCompileUnit ^ Create(System::String ^ resxFile, System::String ^ baseName, System::String ^ generatedCodeNamespace, System::CodeDom::Compiler::CodeDomProvider ^ codeProvider, bool internalClass, [Runtime::InteropServices::Out] cli::array <System::String ^> ^ % unmatchable);
public static System.CodeDom.CodeCompileUnit Create (string resxFile, string baseName, string generatedCodeNamespace, System.CodeDom.Compiler.CodeDomProvider codeProvider, bool internalClass, out string[] unmatchable);
public static System.CodeDom.CodeCompileUnit Create (string resxFile, string baseName, string? generatedCodeNamespace, System.CodeDom.Compiler.CodeDomProvider codeProvider, bool internalClass, out string[]? unmatchable);
static member Create : string * string * string * System.CodeDom.Compiler.CodeDomProvider * bool * String[] -> System.CodeDom.CodeCompileUnit
Public Shared Function Create (resxFile As String, baseName As String, generatedCodeNamespace As String, codeProvider As CodeDomProvider, internalClass As Boolean, ByRef unmatchable As String()) As CodeCompileUnit

パラメーター

resxFile
String

入力として使用される .resx ファイルの名前。

baseName
String

生成するクラスの名前。

generatedCodeNamespace
String

生成するクラスの名前空間。

codeProvider
CodeDomProvider

クラスが生成される言語を提供する CodeDomProvider クラス。

internalClass
Boolean

内部クラスを生成する場合は true。パブリック クラスを生成する場合は false

unmatchable
String[]

プロパティを生成できない各リソース名が含まれる String 配列。 通常、プロパティが生成できないのは、リソース名が有効な識別子ではないためです。

戻り値

CodeCompileUnit コンテナー。

例外

basename または codeProvidernull です。

注釈

メソッドを Create 使用して、 パラメーターに含まれるリソースへの厳密に型指定された読み取り専用アクセスを提供するクラスを resxFile 生成します。

クラスは StronglyTypedResourceBuilder 、"$" または>> "" の文字で始まるリソース名を無視します。 リソース名 "Culture" と "ResourceManager" は無効な識別子です。

適用対象

Create(IDictionary, String, String, String, CodeDomProvider, Boolean, String[])

指定されたコレクションで参照されたリソースと一致する、厳密に型指定されたプロパティが含まれるクラス ファイルを生成します。

public:
 static System::CodeDom::CodeCompileUnit ^ Create(System::Collections::IDictionary ^ resourceList, System::String ^ baseName, System::String ^ generatedCodeNamespace, System::String ^ resourcesNamespace, System::CodeDom::Compiler::CodeDomProvider ^ codeProvider, bool internalClass, [Runtime::InteropServices::Out] cli::array <System::String ^> ^ % unmatchable);
public static System.CodeDom.CodeCompileUnit Create (System.Collections.IDictionary resourceList, string baseName, string generatedCodeNamespace, string resourcesNamespace, System.CodeDom.Compiler.CodeDomProvider codeProvider, bool internalClass, out string[] unmatchable);
public static System.CodeDom.CodeCompileUnit Create (System.Collections.IDictionary resourceList, string baseName, string? generatedCodeNamespace, string? resourcesNamespace, System.CodeDom.Compiler.CodeDomProvider codeProvider, bool internalClass, out string[]? unmatchable);
static member Create : System.Collections.IDictionary * string * string * string * System.CodeDom.Compiler.CodeDomProvider * bool * String[] -> System.CodeDom.CodeCompileUnit
Public Shared Function Create (resourceList As IDictionary, baseName As String, generatedCodeNamespace As String, resourcesNamespace As String, codeProvider As CodeDomProvider, internalClass As Boolean, ByRef unmatchable As String()) As CodeCompileUnit

パラメーター

resourceList
IDictionary

各ディクショナリ エントリのキーと値のペアがリソースの名前とリソースの値である IDictionary コレクション。

baseName
String

生成するクラスの名前。

generatedCodeNamespace
String

生成するクラスの名前空間。

resourcesNamespace
String

生成するリソースの名前空間。

codeProvider
CodeDomProvider

クラスが生成される言語を提供する CodeDomProvider オブジェクト。

internalClass
Boolean

内部クラスを生成する場合は true。パブリック クラスを生成する場合は false

unmatchable
String[]

プロパティを生成できない各リソース名が含まれる String 配列。 通常、プロパティが生成できないのは、リソース名が有効な識別子ではないためです。

戻り値

CodeCompileUnit コンテナー。

例外

resourceListbasename、または codeProvidernull です。

リソース ノード名が resourceList のそのキーと一致しません。

注釈

このオーバーロードを使用すると、 パラメーターを resourcesNamespace 使用して、生成されたリソースの名前空間を指定できます。 この場合、生成されたコードは次のように表示されます。

System.Resources.ResourceManager rm = new System.Resources.ResourceManager("<resourceNamespace>.<baseName>",typeof(baseName).Assembly);

ほとんどの場合、アプリケーション コードからこのメソッドを呼び出す必要はありません。

クラスは StronglyTypedResourceBuilder 、"$" または>> "" の文字で始まるリソース名を無視します。 リソース名 "Culture" と "ResourceManager" は無効な識別子です。

適用対象

Create(String, String, String, String, CodeDomProvider, Boolean, String[])

指定された .resx ファイルのリソースに一致する厳密に型指定されたプロパティを格納するクラス ファイルを生成します。

public:
 static System::CodeDom::CodeCompileUnit ^ Create(System::String ^ resxFile, System::String ^ baseName, System::String ^ generatedCodeNamespace, System::String ^ resourcesNamespace, System::CodeDom::Compiler::CodeDomProvider ^ codeProvider, bool internalClass, [Runtime::InteropServices::Out] cli::array <System::String ^> ^ % unmatchable);
public static System.CodeDom.CodeCompileUnit Create (string resxFile, string baseName, string generatedCodeNamespace, string resourcesNamespace, System.CodeDom.Compiler.CodeDomProvider codeProvider, bool internalClass, out string[] unmatchable);
public static System.CodeDom.CodeCompileUnit Create (string resxFile, string baseName, string? generatedCodeNamespace, string? resourcesNamespace, System.CodeDom.Compiler.CodeDomProvider codeProvider, bool internalClass, out string[]? unmatchable);
static member Create : string * string * string * string * System.CodeDom.Compiler.CodeDomProvider * bool * String[] -> System.CodeDom.CodeCompileUnit
Public Shared Function Create (resxFile As String, baseName As String, generatedCodeNamespace As String, resourcesNamespace As String, codeProvider As CodeDomProvider, internalClass As Boolean, ByRef unmatchable As String()) As CodeCompileUnit

パラメーター

resxFile
String

入力として使用される .resx ファイルの名前。

baseName
String

生成するクラスの名前。

generatedCodeNamespace
String

生成するクラスの名前空間。

resourcesNamespace
String

生成するリソースの名前空間。

codeProvider
CodeDomProvider

クラスが生成される言語を提供する CodeDomProvider クラス。

internalClass
Boolean

内部クラスを生成する場合は true。パブリック クラスを生成する場合は false

unmatchable
String[]

プロパティを生成できない各リソース名が含まれる String 配列。 通常、プロパティが生成できないのは、リソース名が有効な識別子ではないためです。

戻り値

CodeCompileUnit コンテナー。

例外

basename または codeProvidernull です。

注釈

メソッドを Create 使用して、 パラメーターに含まれるリソースへの厳密に型指定された読み取り専用アクセスを提供するクラスを resxFile 生成します。

クラスは StronglyTypedResourceBuilder 、"$" または>> "" の文字で始まるリソース名を無視します。 リソース名 "Culture" と "ResourceManager" は無効な識別子です。

適用対象