IResourceReader 介面

定義

提供從資源檔讀取資料的基本功能。Provides the base functionality for reading data from resource files.

public interface class IResourceReader : IDisposable, System::Collections::IEnumerable
[System.Runtime.InteropServices.ComVisible(true)]
public interface IResourceReader : IDisposable, System.Collections.IEnumerable
type IResourceReader = interface
    interface IEnumerable
    interface IDisposable
Public Interface IResourceReader
Implements IDisposable, IEnumerable
衍生
屬性
實作

備註

資源讀取器是用來從特定格式的資源檔讀取資料流程。Resource readers are used to read a stream of data from resource files in a particular format. 當您想要控制讀取資源檔的方式時, 請執行這個介面 (例如, 如果資源檔是使用自訂ResourceWriter來寫入), 或如果您使用非標準格式或檔案類型來儲存資源。Implement this interface when you want to control the way in which a resource file is read (for example, if the resource file was written by using a customized ResourceWriter) or if you are using a non-standard format or file type for storing resources. 否則, 請使用預設ResourceReader的類別, 它會從二進位 .resources 檔案讀取資源資訊, ResXResourceReader或使用類別, 從 XML 資源檔 (.resx) 讀取資源資訊。Otherwise, use the default ResourceReader class, which reads resource information from binary .resources files, or the ResXResourceReader class, which reads resource information from XML resource (.resx) files.

方法

Close()

在釋放與資源讀取器相關的任何資源之後,關閉資源讀取器。Closes the resource reader after releasing any resources associated with it.

Dispose()

執行與釋放 (Free)、釋放 (Release) 或重設 Unmanaged 資源相關聯之應用程式定義的工作。Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

(繼承來源 IDisposable)
GetEnumerator()

傳回這個讀取器資源的字典列舉程式。Returns a dictionary enumerator of the resources for this reader.

擴充方法

Cast<TResult>(IEnumerable)

IEnumerable 的項目轉換成指定的型別。Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable)

根據指定的型別來篩選 IEnumerable 的項目。Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable)

啟用查詢的平行化作業。Enables parallelization of a query.

AsQueryable(IEnumerable)

IEnumerable 轉換成 IQueryableConverts an IEnumerable to an IQueryable.

適用於

另請參閱