Resource​Indexer Resource​Indexer Resource​Indexer Class

Definition

Indexes source resource files or containers, and generates named resource candidates using particular file and folder naming conventions.

Important

You can't use this class in a Windows Store app.

public : sealed class ResourceIndexer : IResourceIndexerpublic sealed class ResourceIndexer : IResourceIndexerPublic NotInheritable Class ResourceIndexer Implements IResourceIndexer
Attributes
Windows 10 requirements
Device family
Windows Desktop Extension SDK (introduced v10.0.10240.0)
API contract
Windows.ApplicationModel.Resources.Management.ResourceIndexerContract (introduced v1)

Remarks

ResourceIndexer does not guarantee parity of discovered resource candidates with MakePRI.exe because MakePRI may have arbitrary configurations.

Constructors

ResourceIndexer(Uri) ResourceIndexer(Uri) ResourceIndexer(Uri)

Creates a new ResourceIndexer specifying the root of the project files.

public : ResourceIndexer(Uri projectRoot)public ResourceIndexer(Uri projectRoot)Public Sub New(projectRoot As Uri)
Parameters
projectRoot
Uri Uri Uri

The project root folder (file:// URI).

Attributes

Remarks

The parameter projectRoot represents the root of the project for the files to be produced. This is used to determine file paths relative to the package that will contain them.

The path must be an absolute path with the drive letter specified. Long file paths are not supported.

Example:

var idxr = new Windows.ApplicationModel.Resources.Management.ResourceIndexer( 
    new Uri("file:///C:\MyApp\"));
See Also

ResourceIndexer(Uri, Uri) ResourceIndexer(Uri, Uri) ResourceIndexer(Uri, Uri)

Creates a new ResourceIndexer specifying the root of the project files and an extension DLL.

public : ResourceIndexer(Uri projectRoot, Uri extensionDllPath)public ResourceIndexer(Uri projectRoot, Uri extensionDllPath)Public Sub New(projectRoot As Uri, extensionDllPath As Uri)
Parameters
projectRoot
Uri Uri Uri

The project root folder (file:// URI).

extensionDllPath
Uri Uri Uri

The extension DLL path (file:// URI).

Attributes

Remarks

The parameter projectRoot represents the root of the project for the files to be produced. This is used to determine file paths relative to the package that will contain them.

The parameter extensionDllPath represents a full path to an extension DLL that is Microsoft-signed and implements the ext-ms-win-mrmcorer-environment-l1 API set. This determines the file path from where the MRT environment extension DLL will be loaded.

The paths must be absolute paths with the drive letter specified. Long file paths are not supported.

This example shows the constructor used to index source assets intended for a Windows Phone project:

var idxr = new Windows.ApplicationModel.Resources.Management.ResourceIndexer( 
    new Uri("file:///C:\MyApp\"), 
    new Uri("file:///C:\WPSDKPATH\bin\MrmEnvironmentExtDl.dll"));
See Also

Methods

IndexFileContentsAsync(Uri) IndexFileContentsAsync(Uri) IndexFileContentsAsync(Uri)

Indexes a ResW, ResJSON, PRI, or PRI XML dump file path for file and folder naming conventions, and applies the qualifiers to the resources found within the contents of the file.

public : IAsyncOperation<IVectorView<IndexedResourceCandidate>> IndexFileContentsAsync(Uri file)public IAsyncOperation<IReadOnlyList<IndexedResourceCandidate>> IndexFileContentsAsync(Uri file)Public Function IndexFileContentsAsync(file As Uri) As IAsyncOperation( Of IReadOnlyListIndexedResourceCandidate )
Parameters
file
Uri Uri Uri

The file to be indexed (file:// URI). The path must be an absolute path with the drive letter specified. The Uri can also provide an empty authority which is assumed to be the local file system. Long file paths are not supported.

Returns
IAsyncOperation<IVectorView<IndexedResourceCandidate>> IAsyncOperation<IReadOnlyList<IndexedResourceCandidate>> IAsyncOperation<IReadOnlyList<IndexedResourceCandidate>>

A list of IndexedResourceCandidate objects found within file. This is an empty list if nothing is found.

Attributes

IndexFilePath(Uri) IndexFilePath(Uri) IndexFilePath(Uri)

Indexes a file path for file and folder naming conventions.

public : IndexedResourceCandidate IndexFilePath(Uri filePath)public IndexedResourceCandidate IndexFilePath(Uri filePath)Public Function IndexFilePath(filePath As Uri) As IndexedResourceCandidate
Parameters
filePath
Uri Uri Uri

The file to be indexed (file:// URI). The path must be an absolute path with the drive letter specified. The Uri can also provide an empty authority which is assumed to be the local file system. Long file paths are not supported.

Returns
Attributes