IAttachedCollectionService.GetRelationship(Object, String) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
给定关系的名称后,返回包含关系可本地化说明的 IAttachedRelationship。
public:
Microsoft::VisualStudio::Shell::IAttachedRelationship ^ GetRelationship(System::Object ^ item, System::String ^ relationshipName);
public:
Microsoft::VisualStudio::Shell::IAttachedRelationship ^ GetRelationship(Platform::Object ^ item, Platform::String ^ relationshipName);
Microsoft::VisualStudio::Shell::IAttachedRelationship GetRelationship(winrt::Windows::Foundation::IInspectable const & item, std::wstring const & relationshipName);
public Microsoft.VisualStudio.Shell.IAttachedRelationship GetRelationship (object item, string relationshipName);
abstract member GetRelationship : obj * string -> Microsoft.VisualStudio.Shell.IAttachedRelationship
Public Function GetRelationship (item As Object, relationshipName As String) As IAttachedRelationship
参数
- item
- Object
要获取其关系显示信息的项。
- relationshipName
- String
关系的已知名称。
返回
与关系对应的 IAttachedRelationship 实例;如果关系未知,则为 null。