C# Class VsExt.AutoShelve.VsExtAutoShelvePackage

Inheritance: Microsoft.VisualStudio.Shell.Package, IVsSolutionEvents, IDisposable
Afficher le fichier Open project: vercellone/tfsautoshelve Class Usage Examples

Méthodes publiques

Méthode Description
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

Méthodes protégées

Méthode Description
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.

Private Methods

Méthode Description
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

Method Details

Dispose() public méthode

public Dispose ( ) : void
Résultat void

Dispose() protected méthode

protected Dispose ( bool disposeManaged ) : void
disposeManaged bool
Résultat void

Initialize() protected méthode

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
Résultat void

OnAfterCloseSolution() public méthode

public OnAfterCloseSolution ( object pUnkReserved ) : int
pUnkReserved object
Résultat int

OnAfterLoadProject() public méthode

public OnAfterLoadProject ( IVsHierarchy pStubHierarchy, IVsHierarchy pRealHierarchy ) : int
pStubHierarchy IVsHierarchy
pRealHierarchy IVsHierarchy
Résultat int

OnAfterOpenProject() public méthode

public OnAfterOpenProject ( IVsHierarchy pHierarchy, int fAdded ) : int
pHierarchy IVsHierarchy
fAdded int
Résultat int

OnAfterOpenSolution() public méthode

public OnAfterOpenSolution ( object pUnkReserved, int fNewSolution ) : int
pUnkReserved object
fNewSolution int
Résultat int

OnBeforeCloseProject() public méthode

public OnBeforeCloseProject ( IVsHierarchy pHierarchy, int fRemoved ) : int
pHierarchy IVsHierarchy
fRemoved int
Résultat int

OnBeforeCloseSolution() public méthode

public OnBeforeCloseSolution ( object pUnkReserved ) : int
pUnkReserved object
Résultat int

OnBeforeUnloadProject() public méthode

public OnBeforeUnloadProject ( IVsHierarchy pRealHierarchy, IVsHierarchy pStubHierarchy ) : int
pRealHierarchy IVsHierarchy
pStubHierarchy IVsHierarchy
Résultat int

OnQueryCloseProject() public méthode

public OnQueryCloseProject ( IVsHierarchy pHierarchy, int fRemoving, int &pfCancel ) : int
pHierarchy IVsHierarchy
fRemoving int
pfCancel int
Résultat int

OnQueryCloseSolution() public méthode

public OnQueryCloseSolution ( object pUnkReserved, int &pfCancel ) : int
pUnkReserved object
pfCancel int
Résultat int

OnQueryUnloadProject() public méthode

public OnQueryUnloadProject ( IVsHierarchy pRealHierarchy, int &pfCancel ) : int
pRealHierarchy IVsHierarchy
pfCancel int
Résultat int

VsExtAutoShelvePackage() public méthode

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
Résultat System

WriteToActivityLog() public méthode

public WriteToActivityLog ( string message, string stackTrace ) : void
message string
stackTrace string
Résultat void