IAttachedCollectionService.GetOrCreateCollectionSource(Object, String) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或建立 IAttachedCollectionSource 實例,代表指定專案上指定關聯性的附加集合。
public:
Microsoft::VisualStudio::Shell::IAttachedCollectionSource ^ GetOrCreateCollectionSource(System::Object ^ item, System::String ^ relationshipName);
public:
Microsoft::VisualStudio::Shell::IAttachedCollectionSource ^ GetOrCreateCollectionSource(Platform::Object ^ item, Platform::String ^ relationshipName);
Microsoft::VisualStudio::Shell::IAttachedCollectionSource GetOrCreateCollectionSource(winrt::Windows::Foundation::IInspectable const & item, std::wstring const & relationshipName);
public Microsoft.VisualStudio.Shell.IAttachedCollectionSource GetOrCreateCollectionSource (object item, string relationshipName);
abstract member GetOrCreateCollectionSource : obj * string -> Microsoft.VisualStudio.Shell.IAttachedCollectionSource
Public Function GetOrCreateCollectionSource (item As Object, relationshipName As String) As IAttachedCollectionSource
參數
- item
- Object
要從中取得附加集合的專案。
- relationshipName
- String
關聯性名稱,描述要取得或建立的附加集合。
傳回
代表附加集合的 IAttachedCollectionSource 實例。
備註
如需具體範例,“基底類型”所識別關聯性的 “Class” 專案,會導致建構 Items 屬性包含專案基底類型的 IAttachedCollectionSource。