Click here to Skip to main content
15,897,187 members
Articles / Containers / Virtual Machine

A simple Switch Framework for the Visual Studio prompt and the devenv command

Rate me:
Please Sign up or sign in to vote.
4.78/5 (11 votes)
20 Apr 2007CPOL3 min read 53.1K   313   13  
A library for creating custom switches for the devenv command prompt (extensibility example).
<?xml version="1.0"?>
<doc>
    <assembly>
        <name>SimpleSwitchFramework</name>
    </assembly>
    <members>
        <member name="T:SwitchFramework.CustomSwitch">
            <summary>
            Base abstract class for all switches.
            </summary>
        </member>
        <member name="M:SwitchFramework.CustomSwitch.#ctor">
            <summary>
            Default contructor.
            </summary>
        </member>
        <member name="M:SwitchFramework.CustomSwitch.#ctor(SwitchFramework.ISwitchPackage,System.String,System.String[])">
            <summary>
            Contructor.
            </summary>
            <param name="package">Package that launch command.</param>
            <param name="name">Custom switch name.</param>
            <param name="parameters">Custom switch parameters.</param>
        </member>
        <member name="M:SwitchFramework.CustomSwitch.Execute">
            <summary>
            Checks parameters and executes the command.
            </summary>
        </member>
        <member name="M:SwitchFramework.CustomSwitch.Executing">
            <summary>
            Executes the command.
            </summary>
        </member>
        <member name="M:SwitchFramework.CustomSwitch.CheckContext">
            <summary>
            Checks switch and options.
            </summary>
            <returns>Returns true if all right.</returns>
        </member>
        <member name="E:SwitchFramework.CustomSwitch.BeforeExecuting">
            <summary>
            Fires before executing switch.
            </summary>
        </member>
        <member name="E:SwitchFramework.CustomSwitch.AfterExecuting">
            <summary>
            Fires after executing switch.
            </summary>
        </member>
        <member name="P:SwitchFramework.CustomSwitch.Package">
            <summary>
            Gets ISwitchPackage.
            </summary>
        </member>
        <member name="P:SwitchFramework.CustomSwitch.Name">
            <summary>
            Gets switch name.
            </summary>
        </member>
        <member name="P:SwitchFramework.CustomSwitch.Parameters">
            <summary>
            Gets switch parameters.
            </summary>
        </member>
        <member name="T:SwitchFramework.Configuration.StaticConfiguration">
            <summary>
            Manages custom switch configuration.
            </summary>
        </member>
        <member name="T:SwitchFramework.Configuration.Configuration">
            <summary>
            Base class to handle command switch configuration.
            </summary>
        </member>
        <member name="M:SwitchFramework.Configuration.Configuration.#ctor">
            <summary>
            Default Constructor
            </summary>
        </member>
        <member name="M:SwitchFramework.Configuration.Configuration.Initialize">
            <summary>
            Initializes custom switch configuration.
            </summary>
        </member>
        <member name="P:SwitchFramework.Configuration.Configuration.CommandSwitches">
            <summary>
            Gets (set is protected) all command switches read from source (for example commandSwitches.xml file).
            </summary>
        </member>
        <member name="M:SwitchFramework.Configuration.StaticConfiguration.#ctor">
            <summary>
            Default Constructor
            </summary>
        </member>
        <member name="M:SwitchFramework.Configuration.StaticConfiguration.Initialize">
            <summary>
            Initializes custom switch configuration.
            </summary>
        </member>
        <member name="T:SwitchFramework.SimpleSwitchFramework">
             <summary>
             This is the class that implements the package exposed by this assembly.
            
             The minimum requirement for a class to be considered a valid package for Visual Studio
             is to implement the IVsPackage interface and register itself with the shell.
             This package uses the helper classes defined inside the Managed Package Framework (MPF)
             to do it: it derives from the Package class that provides the implementation of the 
             IVsPackage interface and uses the registration attributes defined in the framework to 
             register itself and its components with the shell.
             </summary>
        </member>
        <member name="T:SwitchFramework.ISwitchPackage">
            <summary>
            Interface to communication between package and SwitchFramework.
            </summary>
        </member>
        <member name="P:SwitchFramework.ISwitchPackage.DTE2">
            <summary>
            Gets DTE2 interface.
            </summary>
        </member>
        <member name="M:SwitchFramework.SimpleSwitchFramework.#ctor">
            <summary>
            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.
            </summary>
        </member>
        <member name="M:SwitchFramework.SimpleSwitchFramework.Initialize">
            <summary>
            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 initilaization code that rely on services provided by VisualStudio.
            </summary>
        </member>
        <member name="M:SwitchFramework.SimpleSwitchFramework.DTEEvents_OnStartupComplete">
            <summary>
            Startup completed.
            </summary>
        </member>
        <member name="P:SwitchFramework.SimpleSwitchFramework.SwitchFramework#ISwitchPackage#DTE2">
            <summary>
            Gets DTE2 interface.
            </summary>
        </member>
        <member name="T:SwitchFramework.SwitchException">
            <summary>
            Manages exceptions caused by SwitchFramework.
            </summary>
        </member>
        <member name="M:SwitchFramework.SwitchException.#ctor(System.String)">
            <summary>
            Constructor.
            </summary>
            <param name="message">Exception message.</param>
        </member>
        <member name="T:SwitchFramework.Switches.OpenWebSiteSwitch">
            <summary>
            Manages opening WebSite.
            </summary>
        </member>
        <member name="M:SwitchFramework.Switches.OpenWebSiteSwitch.#ctor(SwitchFramework.ISwitchPackage,System.String,System.String[])">
            <summary>
            Default contructor.
            </summary>
            <param name="package">Package that launch command.</param>
            <param name="name">Custom switch name.</param>
            <param name="parameters">Custom switch parameters.</param>
        </member>
        <member name="M:SwitchFramework.Switches.OpenWebSiteSwitch.Executing">
            <summary>
            Executes the command.
            </summary>
        </member>
        <member name="T:SwitchFramework.Configuration.XmlConfiguration">
            <summary>
            Manages custom switch configuration from switches.xml xml file.
            </summary>
        </member>
        <member name="M:SwitchFramework.Configuration.XmlConfiguration.#ctor">
            <summary>
            Default Constructor
            </summary>
        </member>
        <member name="M:SwitchFramework.Configuration.XmlConfiguration.Initialize">
            <summary>
            Initializes custom switch configuration.
            </summary>
        </member>
        <member name="T:SwitchFramework.Resources">
            <summary>
              A strongly-typed resource class, for looking up localized strings, etc.
            </summary>
        </member>
        <member name="P:SwitchFramework.Resources.ResourceManager">
            <summary>
              Returns the cached ResourceManager instance used by this class.
            </summary>
        </member>
        <member name="P:SwitchFramework.Resources.Culture">
            <summary>
              Overrides the current thread's CurrentUICulture property for all
              resource lookups using this strongly typed resource class.
            </summary>
        </member>
        <member name="P:SwitchFramework.Resources.IllegalSwitchOrOption">
            <summary>
              Looks up a localized string similar to Illegal switch or options!.
            </summary>
        </member>
        <member name="P:SwitchFramework.Resources.switches">
             <summary>
               Looks up a localized string similar to &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&gt;
            &lt;!--
            The value name rappresents the class name.
            For example:
            Switch name attribute is name class.
            --&gt;
            &lt;switches&gt;
              &lt;switch name=&quot;OpenWebSiteSwitch&quot; /&gt;
              &lt;switch name=&quot;AboutSwitch&quot; /&gt;
            &lt;/switches&gt;
            .
             </summary>
        </member>
        <member name="M:SwitchFramework.SwitchCreator.#ctor(SwitchFramework.ISwitchPackage)">
            <summary>
            Contructor.
            </summary>
            <param name="package">Package.</param>
        </member>
        <member name="M:SwitchFramework.SwitchCreator.Create(SwitchFramework.Configuration.CommandSwitch,SwitchFramework.SwitchOptionsParser)">
            <summary>
            Creates a CustomSwitch.
            </summary>
            <param name="commandSwitch">commandSwitch.</param>
            <param name="switchOptionsParser">SwitchOptionsParser.</param>
            <returns>CustomSwitch created.</returns>
        </member>
        <member name="P:SwitchFramework.SwitchCreator.Package">
            <summary>
            Gets ISwitchPackage.
            </summary>
        </member>
        <member name="P:SwitchFramework.SwitchCreator.SwitchOptionsParser">
            <summary>
            Gets SwitchOptionsParser.
            </summary>
        </member>
        <member name="P:SwitchFramework.SwitchCreator.CommandSwitchName">
            <summary>
            Gets CommandSwitchName.
            </summary>
        </member>
        <member name="T:SwitchFramework.Switches.SpecialCaseSwitch">
            <summary>
            Manages special cases, for example null reference.
            </summary>
        </member>
        <member name="M:SwitchFramework.Switches.SpecialCaseSwitch.#ctor(System.String)">
            <summary>
            Default constructor.
            </summary>
        </member>
        <member name="M:SwitchFramework.Switches.SpecialCaseSwitch.Executing">
            <summary>
            Executes the command.
            </summary>
        </member>
        <member name="T:SwitchFramework.SwitchOptionsParser">
            <summary>
            Retreives all options from command line.
            </summary>
        </member>
        <member name="M:SwitchFramework.SwitchOptionsParser.#ctor">
            <summary>
            Default constructor.
            </summary>
        </member>
        <member name="M:SwitchFramework.SwitchOptionsParser.Parse(System.String)">
            <summary>
            Parses options.
            </summary>
            <param name="options">Options to parse.</param>
        </member>
        <member name="M:SwitchFramework.SwitchOptionsParser.ExtractParameters(System.String@)">
            <summary>
            Extracts parameters.
            </summary>
            <param name="options">Options from which extracts parameters.</param>
            <returns>Parameters extracted.</returns>
        </member>
        <member name="P:SwitchFramework.SwitchOptionsParser.Parameters">
            <summary>
            Gets all parameters, if there are, after sub command.
            </summary>
        </member>
        <member name="T:SwitchFramework.Configuration.CommandSwitch">
            <summary>
            Command class from configuration, for example switches.xml file.
            </summary>
        </member>
        <member name="M:SwitchFramework.Configuration.CommandSwitch.#ctor">
            <summary>
            Default constructor.
            </summary>
        </member>
        <member name="M:SwitchFramework.Configuration.CommandSwitch.#ctor(System.String)">
            <summary>
            Constructor.
            </summary>
            <param name="name">Command swithc name.</param>
        </member>
        <member name="P:SwitchFramework.Configuration.CommandSwitch.Name">
            <summary>
            Command name.
            </summary>
        </member>
        <member name="T:SwitchFramework.Switches.AboutSwitch">
            <summary>
            Manages about massage box.
            </summary>
        </member>
        <member name="M:SwitchFramework.Switches.AboutSwitch.#ctor(SwitchFramework.ISwitchPackage,System.String,System.String[])">
            <summary>
            Default contructor.
            </summary>
            <param name="package">Package that launch command.</param>
            <param name="name">Custom switch name.</param>
            <param name="parameters">Custom switch parameters.</param>
        </member>
        <member name="M:SwitchFramework.Switches.AboutSwitch.Executing">
            <summary>
            Executes the command.
            </summary>
        </member>
        <member name="T:SwitchFramework.CustomSwitchEngine">
            <summary>
            Manages command line arguments to instantiate a custom command switches.
            </summary>
        </member>
        <member name="M:SwitchFramework.CustomSwitchEngine.#ctor(SwitchFramework.ISwitchPackage)">
            <summary>
            Default constructor.
            </summary>
            <param name="package">Package.</param>
        </member>
        <member name="M:SwitchFramework.CustomSwitchEngine.GetCustomSwitches(Microsoft.VisualStudio.Shell.Interop.IVsAppCommandLine)">
            <summary>
            Execute a command switch. Throws exception if switch creation fails.
            </summary>
            <param name="commandLine">Command line arguments.</param>
            <returns>Get command custom switches from command line.</returns>
        </member>
        <member name="P:SwitchFramework.CustomSwitchEngine.SwitchOptionsParser">
            <summary>
            Gets or sets a parser for command line options.
            </summary>
        </member>
        <member name="P:SwitchFramework.CustomSwitchEngine.Configuration">
            <summary>
            Gets or sets command switches configuration in order to create CustomSwitches during command line parsing.
            </summary>
        </member>
        <member name="P:SwitchFramework.CustomSwitchEngine.SwitchCreator">
            <summary>
            Gets or sets SwitchCreator.
            </summary>
        </member>
    </members>
</doc>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
Italy Italy
I am a biomedical engineer. I work in Genoa as software developer. I developed MFC ActiveX controls for industrial automation for 2 years and packages for Visual Studio 2005 for 1 year. Currently I'm working in .NET 3.5 in biomedical area.

Comments and Discussions