/// <summary> /// <para> /// Register your own package service /// http://technet.microsoft.com/en-us/office/bb164693(v=vs.71).aspx /// http://blogs.msdn.com/b/aaronmar/archive/2004/03/12/88646.aspx /// http://social.msdn.microsoft.com/Forums/vstudio/en-US/be755076-6e07-4025-93e7-514cd4019dcb/register-own-service?forum=vsx /// IVsRunningDocumentTable rdt = Package.GetGlobalService(typeof(SVsRunningDocumentTable)) as IVsRunningDocumentTable; /// rdt.AdviseRunningDocTableEvents(new YourRunningDocTableEvents()); /// rdt.GetDocumentInfo(docCookie, ...) /// One of the out params is RDT_ProjSlnDocument; this will be set for your solution file. Note this flag also covers projects. Once you have sufficiently determined it is your solution you're set. /// </para> /// <para> /// http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.shell.interop.ivsrunningdoctableevents.onaftersave.aspx /// http://social.msdn.microsoft.com/Forums/vstudio/it-IT/fd513e71-bb23-4de0-b631-35bfbdfdd4f5/visual-studio-isolated-shell-onsolutionsaved-event?forum=vsx /// </para> /// </summary> private void InitializeAutoShelve() { _autoShelve = GetGlobalService(typeof(ISAutoShelve)) as TfsAutoShelve; if (_autoShelve != null) { // Property Initialization _autoShelve.MaximumShelvesets = _options.MaximumShelvesets; _autoShelve.ShelvesetName = _options.ShelvesetName; _autoShelve.Interval = _options.Interval; } AttachEvents(); }
private object CreateService(IServiceContainer container, Type serviceType) { if (typeof(ISAutoShelve) == serviceType) { if (_autoShelve == null) { _autoShelve = new TfsAutoShelve(this); } return(_autoShelve); } return(null); }
public AutoShelveInfos(IAutoShelve service) { this.service = service; MaximumShelvesets = service.MaximumShelvesets; ShelvesetName = service.ShelvesetName; }