IVsSharedProjectQueryCanBeReferenced.QueryCanSharedProjectBeReferenced Yöntem

Tanım

EnumAllAvailableSharedProjects(IVsHierarchy)Paylaşılan projelerin listesini yalnızca için geçerli seçimlere göre filtrelemek için uygulama tarafından çağırılır ReferencingProject .

public:
 System::UInt32 QueryCanSharedProjectBeReferenced(Microsoft::VisualStudio::Shell::Interop::IVsHierarchy ^ ReferencingProject);
public:
 unsigned int QueryCanSharedProjectBeReferenced(Microsoft::VisualStudio::Shell::Interop::IVsHierarchy ^ ReferencingProject);
unsigned int QueryCanSharedProjectBeReferenced(Microsoft::VisualStudio::Shell::Interop::IVsHierarchy const & ReferencingProject);
public uint QueryCanSharedProjectBeReferenced (Microsoft.VisualStudio.Shell.Interop.IVsHierarchy ReferencingProject);
abstract member QueryCanSharedProjectBeReferenced : Microsoft.VisualStudio.Shell.Interop.IVsHierarchy -> uint32
Public Function QueryCanSharedProjectBeReferenced (ReferencingProject As IVsHierarchy) As UInteger

Parametreler

ReferencingProject
IVsHierarchy

Paylaşılan proje başvurusu eklemek isteyen proje.

Döndürülenler

UInt32

Başvurunun izin verilip verilmeyeceğini belirten VSREFERENCEQUERYRESULT sonuç değeri.

Açıklamalar

Bu yöntemin paylaşılan bir proje tarafından beklenen minimum uygulama, paylaşılan proje dilinin, referencingProject diliyle uyumlu olmasını zorunlu kılmaz. Bu denetim, normalde bir ıcapabilitiesmatch denetimi gerçekleştirerek yapılır. Örneğin:

return referencingProject.IsCapabilityMatch($(SharedProjectAppliesTo));  

Paylaşılan projenin $ (SharedProjectAppliesTo) özelliği, referencingProject 'in uyumlu bir dil (ve muhtemelen gelişmiş paylaşılan proje senaryoları için diğer ölçütler) olmasını sağlayan bir yetenekler ifadesi olduğunda. Örneğin, Microsoft. CSharp. CodeSharing. targets dosyasında tanımlanan SharedProjectAppliesTo özelliği aşağıda verilmiştir

<SharedProjectAppliesTo>CSharp<\SharedProjectAppliesTo>  

Şunlara uygulanır