Partager via


ResourceIndexer Classe

Définition

Indexe les fichiers ou conteneurs de ressources sources et génère des candidats de ressources nommés à l’aide de conventions d’affectation de noms de fichiers et de dossiers spécifiques.

Important

Vous ne pouvez pas utiliser cette classe dans une application UWP.

public ref class ResourceIndexer sealed
/// [Windows.Foundation.Metadata.Activatable(Windows.ApplicationModel.Resources.Management.IResourceIndexerFactory2, 65536, Windows.ApplicationModel.Resources.Management.ResourceIndexerContract)]
/// [Windows.Foundation.Metadata.Activatable(Windows.ApplicationModel.Resources.Management.IResourceIndexerFactory, 65536, Windows.ApplicationModel.Resources.Management.ResourceIndexerContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.ApplicationModel.Resources.Management.ResourceIndexerContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class ResourceIndexer final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.ApplicationModel.Resources.Management.ResourceIndexerContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(Windows.ApplicationModel.Resources.Management.IResourceIndexerFactory2, 65536, "Windows.ApplicationModel.Resources.Management.ResourceIndexerContract")]
/// [Windows.Foundation.Metadata.Activatable(Windows.ApplicationModel.Resources.Management.IResourceIndexerFactory, 65536, "Windows.ApplicationModel.Resources.Management.ResourceIndexerContract")]
class ResourceIndexer final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.ApplicationModel.Resources.Management.ResourceIndexerContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(Windows.ApplicationModel.Resources.Management.IResourceIndexerFactory2, 65536, "Windows.ApplicationModel.Resources.Management.ResourceIndexerContract")]
/// [Windows.Foundation.Metadata.Activatable(Windows.ApplicationModel.Resources.Management.IResourceIndexerFactory, 65536, "Windows.ApplicationModel.Resources.Management.ResourceIndexerContract")]
/// [Windows.Foundation.Metadata.Deprecated("Use CreateResourceIndexer in mrmsupport.dll instead of ResourceIndexer.  For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.ApplicationModel.Resources.Management.ResourceIndexerContract")]
class ResourceIndexer final
[Windows.Foundation.Metadata.Activatable(typeof(Windows.ApplicationModel.Resources.Management.IResourceIndexerFactory2), 65536, typeof(Windows.ApplicationModel.Resources.Management.ResourceIndexerContract))]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.ApplicationModel.Resources.Management.IResourceIndexerFactory), 65536, typeof(Windows.ApplicationModel.Resources.Management.ResourceIndexerContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.ApplicationModel.Resources.Management.ResourceIndexerContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class ResourceIndexer
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.ApplicationModel.Resources.Management.ResourceIndexerContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.ApplicationModel.Resources.Management.IResourceIndexerFactory2), 65536, "Windows.ApplicationModel.Resources.Management.ResourceIndexerContract")]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.ApplicationModel.Resources.Management.IResourceIndexerFactory), 65536, "Windows.ApplicationModel.Resources.Management.ResourceIndexerContract")]
public sealed class ResourceIndexer
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.ApplicationModel.Resources.Management.ResourceIndexerContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.ApplicationModel.Resources.Management.IResourceIndexerFactory2), 65536, "Windows.ApplicationModel.Resources.Management.ResourceIndexerContract")]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.ApplicationModel.Resources.Management.IResourceIndexerFactory), 65536, "Windows.ApplicationModel.Resources.Management.ResourceIndexerContract")]
[Windows.Foundation.Metadata.Deprecated("Use CreateResourceIndexer in mrmsupport.dll instead of ResourceIndexer.  For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.ApplicationModel.Resources.Management.ResourceIndexerContract")]
public sealed class ResourceIndexer
Public NotInheritable Class ResourceIndexer
Héritage
Object Platform::Object IInspectable ResourceIndexer
Attributs

Configuration requise pour Windows

Famille d’appareils
Windows Desktop Extension SDK (introduit dans 10.0.10240.0)
API contract
Windows.ApplicationModel.Resources.Management.ResourceIndexerContract (introduit dans v1.0)

Remarques

ResourceIndexer ne garantit pas la parité des candidats aux ressources découvertes avec MakePRI.exe, car MakePRI peut avoir des configurations arbitraires.

Constructeurs

ResourceIndexer(Uri)

Crée un resourceIndexer spécifiant la racine des fichiers projet.

ResourceIndexer(Uri, Uri)

Crée un ResourceIndexer spécifiant la racine des fichiers projet et une DLL d’extension.

Méthodes

IndexFileContentsAsync(Uri)

Indexe un chemin d’accès de fichier de vidage XML ResW, ResJSON, PRI ou PRI pour les conventions d’affectation de noms de fichiers et de dossiers, et applique les qualificateurs aux ressources trouvées dans le contenu du fichier.

IndexFilePath(Uri)

Indexe un chemin d’accès de fichier pour les conventions d’affectation de noms de fichiers et de dossiers.

S’applique à