ResourceIndexer.IndexFileContentsAsync(Uri) 方法

定义

为文件和文件夹命名约定的 ResW、ResJSON、PRI 或 PRI XML 转储文件路径编制索引,并将限定符应用于在文件内容中找到的资源。

public:
 virtual IAsyncOperation<IVectorView<IndexedResourceCandidate ^> ^> ^ IndexFileContentsAsync(Uri ^ file) = IndexFileContentsAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<IVectorView<IndexedResourceCandidate>> IndexFileContentsAsync(Uri const& file);
/// [Windows.Foundation.Metadata.RemoteAsync]
/// [Windows.Foundation.Metadata.Deprecated("Use IndexFilePath in mrmsupport.dll instead of IResourceIndexer.  For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.ApplicationModel.Resources.Management.ResourceIndexerContract")]
IAsyncOperation<IVectorView<IndexedResourceCandidate>> IndexFileContentsAsync(Uri const& file);
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<IReadOnlyList<IndexedResourceCandidate>> IndexFileContentsAsync(System.Uri file);
[Windows.Foundation.Metadata.RemoteAsync]
[Windows.Foundation.Metadata.Deprecated("Use IndexFilePath in mrmsupport.dll instead of IResourceIndexer.  For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.ApplicationModel.Resources.Management.ResourceIndexerContract")]
public IAsyncOperation<IReadOnlyList<IndexedResourceCandidate>> IndexFileContentsAsync(System.Uri file);
function indexFileContentsAsync(file)
Public Function IndexFileContentsAsync (file As Uri) As IAsyncOperation(Of IReadOnlyList(Of IndexedResourceCandidate))

参数

file
Uri Uri

要 (file:// URI) 索引的文件。 该路径必须是指定的驱动器号的绝对路径。 URI 还可以提供假定为本地文件系统的空颁发机构。 不支持长文件路径。

返回

文件中找到的 IndexedResourceCandidate 对象的列表。 如果未找到任何内容,则为空列表。

属性

适用于