IResourceReader IResourceReader IResourceReader IResourceReader Interface


提供从资源文件读取数据的基本功能。Provides the base functionality for reading data from resource files.

public interface class IResourceReader : IDisposable, System::Collections::IEnumerable
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() Close() Close() Close()

释放与资源阅读器关联的所有资源后将该阅读器关闭。Closes the resource reader after releasing any resources associated with it.

Dispose() Dispose() Dispose() Dispose()

执行与释放或重置非托管资源关联的应用程序定义的任务。Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

(Inherited from IDisposable)
GetEnumerator() GetEnumerator() GetEnumerator() GetEnumerator()

返回此阅读器的资源的字典枚举器。Returns a dictionary enumerator of the resources for this reader.


Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable) Cast<TResult>(IEnumerable)

IEnumerable 的元素强制转换为指定的类型。Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable) OfType<TResult>(IEnumerable)

根据指定类型筛选 IEnumerable 的元素。Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable) AsParallel(IEnumerable)

启用查询的并行化。Enables parallelization of a query.

AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable) AsQueryable(IEnumerable)

IEnumerable 转换为 IQueryableConverts an IEnumerable to an IQueryable.