C# Класс VsExt.AutoShelve.VsExtAutoShelvePackage

Наследование: Microsoft.VisualStudio.Shell.Package, IVsSolutionEvents, IDisposable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Dispose ( ) : void
OnAfterCloseSolution ( object pUnkReserved ) : int
OnAfterLoadProject ( IVsHierarchy pStubHierarchy, IVsHierarchy pRealHierarchy ) : int
OnAfterOpenProject ( IVsHierarchy pHierarchy, int fAdded ) : int
OnAfterOpenSolution ( object pUnkReserved, int fNewSolution ) : int
OnBeforeCloseProject ( IVsHierarchy pHierarchy, int fRemoved ) : int
OnBeforeCloseSolution ( object pUnkReserved ) : int
OnBeforeUnloadProject ( IVsHierarchy pRealHierarchy, IVsHierarchy pStubHierarchy ) : int
OnQueryCloseProject ( IVsHierarchy pHierarchy, int fRemoving, int &pfCancel ) : int
OnQueryCloseSolution ( object pUnkReserved, int &pfCancel ) : int
OnQueryUnloadProject ( IVsHierarchy pRealHierarchy, int &pfCancel ) : int
VsExtAutoShelvePackage ( ) : System

Default constructor of the package. Inside this method you can place any initialization code that does not require any Visual Studio service because at this point the package object is created but not sited yet inside Visual Studio environment. The place to do all the other initialization is the Initialize method.

WriteToActivityLog ( string message, string stackTrace ) : void

Защищенные методы

Метод Описание
Dispose ( bool disposeManaged ) : void
Initialize ( ) : void

Initialization of the package; this method is called right after the package is sited, so this is the place where you can put all the initialization code that rely on services provided by VisualStudio.

Приватные методы

Метод Описание
AttachEvents ( ) : void
CreateService ( IServiceContainer container, Type serviceType ) : object
DetachEvents ( ) : void
DisplayRunState ( ) : void
InitializeAutoShelve ( ) : void

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. 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

InitializeMenus ( ) : void
MenuItemCallbackAutoShelveRunState ( object sender, System e ) : void
MenuItemCallbackRunNow ( object sender, System e ) : void
OnEnterDesignMode ( dbgEventReason Reason ) : void
OnEnterRunMode ( dbgEventReason Reason ) : void
Options_OnOptionsChanged ( object sender, VsExt.AutoShelve.EventArgs.OptionsChangedEventArgs e ) : void
ToggleMenuCommandRunStateText ( object sender ) : void
WriteException ( Exception ex ) : void
WriteLineToOutputWindow ( string outputText ) : void
WriteToOutputWindow ( string outputText, bool newLine = false ) : void
WriteToStatusBar ( string text ) : void
autoShelve_OnShelvesetCreated ( object sender, VsExt.AutoShelve.EventArgs.ShelvesetCreatedEventArgs e ) : void
autoShelve_OnStart ( object sender, System e ) : void
autoShelve_OnStop ( object sender, System e ) : void
autoShelve_OnTfsConnectionError ( object sender, VsExt.AutoShelve.EventArgs.TfsConnectionErrorEventArgs e ) : void

Описание методов

Dispose() публичный Метод

public Dispose ( ) : void
Результат void

Dispose() защищенный Метод

protected Dispose ( bool disposeManaged ) : void
disposeManaged bool
Результат void

Initialize() защищенный Метод

Initialization of the package; this method is called right after the package is sited, so this is the place where you can put all the initialization code that rely on services provided by VisualStudio.
protected Initialize ( ) : void
Результат void

OnAfterCloseSolution() публичный Метод

public OnAfterCloseSolution ( object pUnkReserved ) : int
pUnkReserved object
Результат int

OnAfterLoadProject() публичный Метод

public OnAfterLoadProject ( IVsHierarchy pStubHierarchy, IVsHierarchy pRealHierarchy ) : int
pStubHierarchy IVsHierarchy
pRealHierarchy IVsHierarchy
Результат int

OnAfterOpenProject() публичный Метод

public OnAfterOpenProject ( IVsHierarchy pHierarchy, int fAdded ) : int
pHierarchy IVsHierarchy
fAdded int
Результат int

OnAfterOpenSolution() публичный Метод

public OnAfterOpenSolution ( object pUnkReserved, int fNewSolution ) : int
pUnkReserved object
fNewSolution int
Результат int

OnBeforeCloseProject() публичный Метод

public OnBeforeCloseProject ( IVsHierarchy pHierarchy, int fRemoved ) : int
pHierarchy IVsHierarchy
fRemoved int
Результат int

OnBeforeCloseSolution() публичный Метод

public OnBeforeCloseSolution ( object pUnkReserved ) : int
pUnkReserved object
Результат int

OnBeforeUnloadProject() публичный Метод

public OnBeforeUnloadProject ( IVsHierarchy pRealHierarchy, IVsHierarchy pStubHierarchy ) : int
pRealHierarchy IVsHierarchy
pStubHierarchy IVsHierarchy
Результат int

OnQueryCloseProject() публичный Метод

public OnQueryCloseProject ( IVsHierarchy pHierarchy, int fRemoving, int &pfCancel ) : int
pHierarchy IVsHierarchy
fRemoving int
pfCancel int
Результат int

OnQueryCloseSolution() публичный Метод

public OnQueryCloseSolution ( object pUnkReserved, int &pfCancel ) : int
pUnkReserved object
pfCancel int
Результат int

OnQueryUnloadProject() публичный Метод

public OnQueryUnloadProject ( IVsHierarchy pRealHierarchy, int &pfCancel ) : int
pRealHierarchy IVsHierarchy
pfCancel int
Результат int

VsExtAutoShelvePackage() публичный Метод

Default constructor of the package. Inside this method you can place any initialization code that does not require any Visual Studio service because at this point the package object is created but not sited yet inside Visual Studio environment. The place to do all the other initialization is the Initialize method.
public VsExtAutoShelvePackage ( ) : System
Результат System

WriteToActivityLog() публичный Метод

public WriteToActivityLog ( string message, string stackTrace ) : void
message string
stackTrace string
Результат void