本文整理汇总了C#中IVsHierarchy.AdviseHierarchyEvents方法的典型用法代码示例。如果您正苦于以下问题:C# IVsHierarchy.AdviseHierarchyEvents方法的具体用法?C# IVsHierarchy.AdviseHierarchyEvents怎么用?C# IVsHierarchy.AdviseHierarchyEvents使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IVsHierarchy
的用法示例。
在下文中一共展示了IVsHierarchy.AdviseHierarchyEvents方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnAfterOpenProject
public int OnAfterOpenProject(IVsHierarchy pHierarchy, int fAdded)
{
uint cookie;
pHierarchy.AdviseHierarchyEvents(new ProjectEventSink(pHierarchy), out cookie);
projectCookies[pHierarchy] = cookie;
return 0;
}
示例2: LocatorProject
public LocatorProject(IVsHierarchy hierarchy)
{
Hierarchy = hierarchy;
object obj;
int result = hierarchy.GetProperty(VSConstants.VSITEMID_ROOT, (int)__VSHPROPID.VSHPROPID_Name, out obj);
if (result == VSConstants.S_OK)
Name = obj as string;
else
Name = string.Empty;
Items = new List<LocatorProjectItem>();
ProcessHierarchy(VSConstants.VSITEMID_ROOT, hierarchy);
Hierarchy.AdviseHierarchyEvents(this, out _cookie);
}
示例3: OnAfterOpenProject
public int OnAfterOpenProject(IVsHierarchy pHierarchy, int fAdded)
{
HierarchyEventsHandler events = new HierarchyEventsHandler(
solution, pHierarchy);
uint cookie;
pHierarchy.AdviseHierarchyEvents(events, out cookie);
string name = new HierarchyItem(pHierarchy).CanonicalName;
hierarchyCookies[name] = cookie;
if(fAdded != 0)
CxxTestPackage.Instance.TryToRefreshTestSuitesView();
return VSConstants.S_OK;
}
示例4: VsHierarchyEvents
int IVsSolutionEvents.OnAfterOpenProject(IVsHierarchy pHierarchy, int fAdded)
{
_vsHierarchyEvents = new VsHierarchyEvents(pHierarchy, _reportList);
pHierarchy.AdviseHierarchyEvents(_vsHierarchyEvents, out _cookie);
return VSConstants.S_OK;
}