ResXResourceReader.FromFileContents 方法

定義

建立新的 ResXResourceReader 物件,並將其初始化,以讀取內容為 XML 資源檔格式的字串。Creates a new ResXResourceReader object and initializes it to read a string whose contents are in the form of an XML resource file.

多載

FromFileContents(String)

建立新的 ResXResourceReader 物件,並將其初始化,以讀取內容為 XML 資源檔格式的字串。Creates a new ResXResourceReader object and initializes it to read a string whose contents are in the form of an XML resource file.

FromFileContents(String, ITypeResolutionService)

建立新的 ResXResourceReader 物件,並將其初始化,以讀取內容為 XML 資源檔格式的字串,並使用 ITypeResolutionService 物件解析資源中指定的型別名稱。Creates a new ResXResourceReader object and initializes it to read a string whose contents are in the form of an XML resource file, and to use an ITypeResolutionService object to resolve type names specified in a resource.

FromFileContents(String, AssemblyName[])

建立新的 ResXResourceReader 物件,並將其初始化,以讀取內容為 XML 資源檔格式的字串,並使用 AssemblyName 物件的陣列解析資源中指定的型別名稱。Creates a new ResXResourceReader object and initializes it to read a string whose contents are in the form of an XML resource file, and to use an array of AssemblyName objects to resolve type names specified in a resource.

FromFileContents(String)

建立新的 ResXResourceReader 物件,並將其初始化,以讀取內容為 XML 資源檔格式的字串。Creates a new ResXResourceReader object and initializes it to read a string whose contents are in the form of an XML resource file.

public:
 static System::Resources::ResXResourceReader ^ FromFileContents(System::String ^ fileContents);
public static System.Resources.ResXResourceReader FromFileContents (string fileContents);
static member FromFileContents : string -> System.Resources.ResXResourceReader
Public Shared Function FromFileContents (fileContents As String) As ResXResourceReader

參數

fileContents
String

字串,包含 XML 資源格式的資訊。A string containing XML resource-formatted information.

傳回

物件,該物件會從 fileContents 字串讀取資源。An object that reads resources from the fileContents string.

安全性

LinkDemand
針對立即呼叫者的完全信任的。for full trust for the immediate caller. 這個成員無法供部分信任的程式碼使用。This member cannot be used by partially trusted code.

InheritanceDemand
適用於繼承者的完全信任的。for full trust for inheritors. 部分信任的程式碼無法繼承這個成員。This member cannot be inherited by partially trusted code.

FromFileContents(String, ITypeResolutionService)

建立新的 ResXResourceReader 物件,並將其初始化,以讀取內容為 XML 資源檔格式的字串,並使用 ITypeResolutionService 物件解析資源中指定的型別名稱。Creates a new ResXResourceReader object and initializes it to read a string whose contents are in the form of an XML resource file, and to use an ITypeResolutionService object to resolve type names specified in a resource.

public:
 static System::Resources::ResXResourceReader ^ FromFileContents(System::String ^ fileContents, System::ComponentModel::Design::ITypeResolutionService ^ typeResolver);
public static System.Resources.ResXResourceReader FromFileContents (string fileContents, System.ComponentModel.Design.ITypeResolutionService typeResolver);
static member FromFileContents : string * System.ComponentModel.Design.ITypeResolutionService -> System.Resources.ResXResourceReader
Public Shared Function FromFileContents (fileContents As String, typeResolver As ITypeResolutionService) As ResXResourceReader

參數

fileContents
String

字串,包含 XML 資源格式的資訊。A string containing XML resource-formatted information.

typeResolver
ITypeResolutionService

物件,可解析資源中指定的型別名稱。An object that resolves type names specified in a resource.

傳回

物件,該物件會從 fileContents 字串讀取資源。An object that reads resources from the fileContents string.

安全性

LinkDemand
針對立即呼叫者的完全信任的。for full trust for the immediate caller. 這個成員無法供部分信任的程式碼使用。This member cannot be used by partially trusted code.

InheritanceDemand
適用於繼承者的完全信任的。for full trust for inheritors. 部分信任的程式碼無法繼承這個成員。This member cannot be inherited by partially trusted code.

FromFileContents(String, AssemblyName[])

建立新的 ResXResourceReader 物件,並將其初始化,以讀取內容為 XML 資源檔格式的字串,並使用 AssemblyName 物件的陣列解析資源中指定的型別名稱。Creates a new ResXResourceReader object and initializes it to read a string whose contents are in the form of an XML resource file, and to use an array of AssemblyName objects to resolve type names specified in a resource.

public:
 static System::Resources::ResXResourceReader ^ FromFileContents(System::String ^ fileContents, cli::array <System::Reflection::AssemblyName ^> ^ assemblyNames);
public static System.Resources.ResXResourceReader FromFileContents (string fileContents, System.Reflection.AssemblyName[] assemblyNames);
static member FromFileContents : string * System.Reflection.AssemblyName[] -> System.Resources.ResXResourceReader
Public Shared Function FromFileContents (fileContents As String, assemblyNames As AssemblyName()) As ResXResourceReader

參數

fileContents
String

內容為 XML 資源檔格式的字串。A string whose contents are in the form of an XML resource file.

assemblyNames
AssemblyName[]

指定一個或多個組件的 AssemblyName 物件陣列。An array of AssemblyName objects that specifies one or more assemblies. 組件可用來將資源中的型別名稱解析為實際的型別。The assemblies are used to resolve a type name in the resource to an actual type.

傳回

物件,該物件會從 fileContents 字串讀取資源。An object that reads resources from the fileContents string.

安全性

LinkDemand
針對立即呼叫者的完全信任的。for full trust for the immediate caller. 這個成員無法供部分信任的程式碼使用。This member cannot be used by partially trusted code.

InheritanceDemand
適用於繼承者的完全信任的。for full trust for inheritors. 部分信任的程式碼無法繼承這個成員。This member cannot be inherited by partially trusted code.

適用於