IResourceWriter 介面

定義

提供將資源寫入輸出檔或資料流的基本功能。

public interface class IResourceWriter : IDisposable
public interface IResourceWriter : IDisposable
[System.Runtime.InteropServices.ComVisible(true)]
public interface IResourceWriter : IDisposable
type IResourceWriter = interface
    interface IDisposable
[<System.Runtime.InteropServices.ComVisible(true)>]
type IResourceWriter = interface
    interface IDisposable
Public Interface IResourceWriter
Implements IDisposable
衍生
屬性
實作

備註

資源寫入器可用來以特定檔案格式將資源寫入檔案。 例如,如果您想要控制資源檔 (寫入的方式,請將資源儲存在.txt、.resx 或二進位 .resources 檔案) 以外的專案,請實作這個介面。 否則,請使用預設 ResourceWriter 類別,將資源寫入二進位 .resources 檔案,或是 ResXResourceWriter 將資源寫入 XML 資源 (.resx) 檔案的 類別。

方法

AddResource(String, Byte[])

將 8 位元不帶正負號的整數 (Unsigned Integer) 陣列當做具名資源,加入被寫入的資源清單。

AddResource(String, Object)

Object 型別的具名資源加入要被寫入的資源清單中。

AddResource(String, String)

String 型別的具名資源加入要被寫入的資源清單中。

Close()

關閉基礎資源檔或資料流,確保所有資料已經寫入檔案。

Dispose()

執行與釋放 (Free)、釋放 (Release) 或重設 Unmanaged 資源相關聯之應用程式定義的工作。

(繼承來源 IDisposable)
Generate()

將所有藉由 AddResource(String, String) 方法加入的資源寫入輸出檔或資料流。

適用於

另請參閱