C# Class VsExt.AutoShelve.VsExtAutoShelvePackage

Inheritance: Microsoft.VisualStudio.Shell.Package, IVsSolutionEvents, IDisposable
ファイルを表示 Open project: vercellone/tfsautoshelve Class Usage Examples

Public Methods

Method 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

Protected Methods

Method 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

Method 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 method

public Dispose ( ) : void
return void

Dispose() protected method

protected Dispose ( bool disposeManaged ) : void
disposeManaged bool
return void

Initialize() protected method

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
return void

OnAfterCloseSolution() public method

public OnAfterCloseSolution ( object pUnkReserved ) : int
pUnkReserved object
return int

OnAfterLoadProject() public method

public OnAfterLoadProject ( IVsHierarchy pStubHierarchy, IVsHierarchy pRealHierarchy ) : int
pStubHierarchy IVsHierarchy
pRealHierarchy IVsHierarchy
return int

OnAfterOpenProject() public method

public OnAfterOpenProject ( IVsHierarchy pHierarchy, int fAdded ) : int
pHierarchy IVsHierarchy
fAdded int
return int

OnAfterOpenSolution() public method

public OnAfterOpenSolution ( object pUnkReserved, int fNewSolution ) : int
pUnkReserved object
fNewSolution int
return int

OnBeforeCloseProject() public method

public OnBeforeCloseProject ( IVsHierarchy pHierarchy, int fRemoved ) : int
pHierarchy IVsHierarchy
fRemoved int
return int

OnBeforeCloseSolution() public method

public OnBeforeCloseSolution ( object pUnkReserved ) : int
pUnkReserved object
return int

OnBeforeUnloadProject() public method

public OnBeforeUnloadProject ( IVsHierarchy pRealHierarchy, IVsHierarchy pStubHierarchy ) : int
pRealHierarchy IVsHierarchy
pStubHierarchy IVsHierarchy
return int

OnQueryCloseProject() public method

public OnQueryCloseProject ( IVsHierarchy pHierarchy, int fRemoving, int &pfCancel ) : int
pHierarchy IVsHierarchy
fRemoving int
pfCancel int
return int

OnQueryCloseSolution() public method

public OnQueryCloseSolution ( object pUnkReserved, int &pfCancel ) : int
pUnkReserved object
pfCancel int
return int

OnQueryUnloadProject() public method

public OnQueryUnloadProject ( IVsHierarchy pRealHierarchy, int &pfCancel ) : int
pRealHierarchy IVsHierarchy
pfCancel int
return int

VsExtAutoShelvePackage() public method

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
return System

WriteToActivityLog() public method

public WriteToActivityLog ( string message, string stackTrace ) : void
message string
stackTrace string
return void