IVsWCFMetadataStorageProvider Interface
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Fournit une interface pour enregistrer des métadonnées de service Windows Communication Foundation (WCF) dans le système de projet.
public interface class IVsWCFMetadataStorageProvider
public interface class IVsWCFMetadataStorageProvider
__interface IVsWCFMetadataStorageProvider
[System.Runtime.InteropServices.Guid("F71D2B05-680F-423B-B00F-52A2944AC45C")]
[System.Runtime.InteropServices.InterfaceType(1)]
public interface IVsWCFMetadataStorageProvider
[<System.Runtime.InteropServices.Guid("F71D2B05-680F-423B-B00F-52A2944AC45C")>]
[<System.Runtime.InteropServices.InterfaceType(1)>]
type IVsWCFMetadataStorageProvider = interface
Public Interface IVsWCFMetadataStorageProvider
- Attributs
Exemples
L’exemple suivant utilise l' IVsWCFMetadataStorageProvider interface pour déterminer si un projet prend en charge les références de service WCF.
/// Helper method to determine if WCF ServiceReferences are
/// supported by the given hierarchy.
private static bool
ServiceReferencesSupported(IVsWCFReferenceManagerFactory factory,
IVsHierarchy hierarchy)
{
if (hierarchy != null)
{
// Try to see if Reference Manager Factory supports it.
if
(!Convert.ToBoolean(factory.IsReferenceManagerSupported(hierarchy)))
{
return false;
}
/// If factory supports, then ask Hierarchy. They both need to
/// support it.
if ((hierarchy as IVsWCFMetadataStorageProvider) != null)
{
try
{
object objIsServiceReferenceSupported;
ErrorHandler.ThrowOnFailure(hierarchy.GetProperty
(Microsoft.VisualStudio.VSConstants.VSITEMID_ROOT,
(int)__VSHPROPID3.VSHPROPID_ServiceReferenceSupported,
out objIsServiceReferenceSupported));
if (objIsServiceReferenceSupported != null &&
objIsServiceReferenceSupported is bool)
{
return (bool)objIsServiceReferenceSupported;
}
}
catch (NotImplementedException)
{
// If the property isn't implemented in the current
// project system, then we know that
// service references aren't supported.
}
}
}
return false;
}
Remarques
Les systèmes de projet doivent implémenter cette interface. Appelez cette interface pour créer un nouveau stockage pour enregistrer un groupe de référence de service ou pour émuler des stockages existants dans le projet.
Le système de projet doit déterminer la structure de répertoire correcte pour stocker ses métadonnées.
Méthodes
| AdviseWCFMetadataStorageProviderEvents(IVsWCFMetadataStorageProviderEvents, UInt32) |
Inscrit l'appelant pour la notification d'événements du fournisseur de magasins de métadonnées. |
| CreateStorage(String, String, IVsWCFMetadataStorage, StorageNameValidationState) |
Crée un nouveau stockage de métadonnées Windows Communication Foundation (WCF). |
| GetStorageFromMapFile(String) |
Retourne un magasin de métadonnées Windows Communication Foundation (WCF) sur le chemin d'accès complet d'un fichier de .svcmap. |
| GetStorages() |
Énumère les stockages de métadonnées Windows Communication Foundation (WCF) dans un projet. |
| IsValidNewReferenceName(String, String, SByte, StorageNameValidationState, String) |
Retourne une valeur qui détermine si un nom pour une référence de service Windows Communication Foundation (WCF) est unique. |
| MakeValidReferenceName(String, String, String, String) |
Retourne un nom unique et un espace de noms pour une référence de service Windows Communication Foundation (WCF). |
| UnadviseWCFMetadataStorageProviderEvents(UInt32) |
Annule l'inscription à la notification d'événement du fournisseur de stockage de métadonnées. |