ResourceIndexer ResourceIndexer ResourceIndexer Class

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.

Syntax

Declaration

public sealed class ResourceIndexerpublic sealed class ResourceIndexerPublic NotInheritable Class ResourceIndexer

Remarks

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

Constructors summary

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

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

Methods summary

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.

Indexes a file path for file and folder naming conventions.

Constructors

  • ResourceIndexer(Windows.Foundation.Uri)
    ResourceIndexer(Windows.Foundation.Uri)
    ResourceIndexer(Windows.Foundation.Uri)
    ResourceIndexer(Windows.Foundation.Uri)

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

    public ResourceIndexer(Windows.Foundation.Uri projectRoot)public ResourceIndexer(Windows.Foundation.Uri projectRoot)Public Function ResourceIndexer(projectRoot As Windows.Foundation.Uri) As

    Parameters

    • projectRoot

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

    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\"));
    
  • ResourceIndexer(Windows.Foundation.Uri,Windows.Foundation.Uri)
    ResourceIndexer(Windows.Foundation.Uri,Windows.Foundation.Uri)
    ResourceIndexer(Windows.Foundation.Uri,Windows.Foundation.Uri)
    ResourceIndexer(Windows.Foundation.Uri,Windows.Foundation.Uri)

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

    public ResourceIndexer(Windows.Foundation.Uri projectRoot,Windows.Foundation.Uri extensionDllPath)public ResourceIndexer(Windows.Foundation.Uri projectRoot,Windows.Foundation.Uri extensionDllPath)Public Function ResourceIndexer(projectRoot As Windows.Foundation.Uri,extensionDllPath As Windows.Foundation.Uri) As

    Parameters

    • projectRoot

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

    • extensionDllPath

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

    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"));
    

Methods

  • IndexFileContentsAsync(Windows.Foundation.Uri)
    IndexFileContentsAsync(Windows.Foundation.Uri)
    IndexFileContentsAsync(Windows.Foundation.Uri)
    IndexFileContentsAsync(Windows.Foundation.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<IndexedResourceCandidate>> IndexFileContentsAsync(Windows.Foundation.Uri file)public IAsyncOperation<IndexedResourceCandidate>> IndexFileContentsAsync(Windows.Foundation.Uri file)Public Function IndexFileContentsAsync(file As Windows.Foundation.Uri) As IAsyncOperation( Of IndexedResourceCandidate )

    Parameters

    • file

      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

  • IndexFilePath(Windows.Foundation.Uri)
    IndexFilePath(Windows.Foundation.Uri)
    IndexFilePath(Windows.Foundation.Uri)
    IndexFilePath(Windows.Foundation.Uri)

    Indexes a file path for file and folder naming conventions.

    public IndexedResourceCandidate IndexFilePath(Windows.Foundation.Uri filePath)public IndexedResourceCandidate IndexFilePath(Windows.Foundation.Uri filePath)Public Function IndexFilePath(filePath As Windows.Foundation.Uri) As IndexedResourceCandidate

    Parameters

    • filePath

      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

Device family

Windows Desktop Extension SDK (introduced v10.0.10240.0)

API contract

Windows.ApplicationModel.Resources.Management.ResourceIndexerContract (introduced v1)

Attributes

Windows.Foundation.Metadata.WebHostHiddenAttribute
Windows.Foundation.Metadata.ActivatableAttribute
Windows.Foundation.Metadata.ThreadingAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute
Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.ActivatableAttribute

Details

Assembly

Windows.ApplicationModel.Resources.Management.dll