PreserializedResourceWriter 類別

定義

提供類似於 ResourceWriter 的 API,可寫入預先序列化的資源資料。Provides APIs similar to ResourceWriter that can write pre-serialized resource data.

public ref class PreserializedResourceWriter sealed : IDisposable, System::Resources::IResourceWriter
public sealed class PreserializedResourceWriter : IDisposable, System.Resources.IResourceWriter
type PreserializedResourceWriter = class
    interface IDisposable
    interface IResourceWriter
Public NotInheritable Class PreserializedResourceWriter
Implements IDisposable, IResourceWriter
繼承
PreserializedResourceWriter
實作

建構函式

PreserializedResourceWriter(Stream)

初始化 PreserializedResourceWriter 類別的新執行個體,這個執行個體可將資源寫入提供的資料流。Initializes a new instance of the PreserializedResourceWriter class that writes the resources to the provided stream.

PreserializedResourceWriter(String)

初始化 PreserializedResourceWriter 類別的新執行個體,這個執行個體會將資源寫入指定的檔案。Initializes a new instance of the PreserializedResourceWriter class that writes the resources to the specified file.

方法

AddActivatorResource(String, Stream, String, Boolean)

在讀取資源時,新增由傳遞至類型建構函式的 Stream 值所表示指定類型資源。Adds a resource of the specified type represented by a Stream value that is passed to the type's constructor when reading the resource.

AddBinaryFormattedResource(String, Byte[], String)

新增指定類型的資源 (由位元組陣列表示),在讀取資源時將會傳遞給 BinaryFormatterAdds a resource of the specified type, represented by a byte array, that will be passed to BinaryFormatter when reading the resource.

AddResource(String, Byte[])

將位元組陣列作為具名資源,新增至要寫入檔案的資源清單。Adds a byte array as a named resource to the list of resources to be written to a file.

AddResource(String, Object)

將物件作為具名資源新增至要寫入檔案的資源清單。Adds an object as a named resource to the list of resources to be written to a file.

AddResource(String, Stream, Boolean)

Stream 作為具名資源新增至要寫入檔案的資源清單。Adds a Stream as a named resource to the list of resources to be written to a file.

AddResource(String, String)

將字串作為具名資源新增至要寫入檔案的資源清單。Adds a string as a named resource to the list of resources to be written to a file.

AddResource(String, String, String)

新增指定類型的資源,由字串值表示。Adds a resource of the specified type represented by a string value.

AddTypeConverterResource(String, Byte[], String)

新增指定類型的資源 (由位元組陣列表示),在讀取資源時會傳遞給類型的 TypeConverterAdds a resource of the specified type represented by a byte array that is passed to the type's TypeConverter when reading the resource.

Close()

呼叫 Dispose() 以處置資源寫入器。Calls Dispose() to dispose the resource writer.

Dispose()

會呼叫 Generate(),以系統預設格式將所有資源寫出至輸出資料流。Calls Generate() to write out all resources to the output stream in the system default format.

Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(繼承來源 Object)
Generate()

將所有資源寫入輸出資料流。Writes all resources to the output stream.

GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(繼承來源 Object)
GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

(繼承來源 Object)
ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(繼承來源 Object)

適用於