Ejemplo n.º 1
0
        /// <summary>
        /// Fired when the user invokes the menu item "Include Item".
        /// </summary>
        /// <param name="sender">The <c>OleMenuCommand</c> that represents the menu item.</param>
        /// <param name="eventArgs">The event arguments.</param>
        private void InvokeIncludeItem(object sender, EventArgs eventArgs)
        {
            Param.AssertNotNull(sender, "sender");
            Param.Ignore(eventArgs);

            StyleCopTrace.In(sender, eventArgs);

            OleMenuCommand menuCommand = (OleMenuCommand)sender;

            CommandSet.CheckMenuItemValidity(menuCommand);

            ProjectUtilities.SetItemExcluded(AnalysisType.Item, false);

            StyleCopTrace.Out();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Fired when the user invokes the menu item "Analyze Item".
        /// </summary>
        /// <param name="sender">The <c>OleMenuCommand</c> that represents the menu item.</param>
        /// <param name="eventArgs">The event arguments.</param>
        private void InvokeAnalyzeItem(object sender, EventArgs eventArgs)
        {
            Param.AssertNotNull(sender, "sender");
            Param.Ignore(eventArgs);

            StyleCopTrace.In(sender, eventArgs);

            OleMenuCommand menuCommand = (OleMenuCommand)sender;

            CommandSet.CheckMenuItemValidity(menuCommand);

            this.helper.Analyze(false, AnalysisType.Item);

            StyleCopTrace.Out();
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Fired when the user invokes the menu item "Exclude Item".
        /// </summary>
        /// <param name="sender">The <c>OleMenuCommand</c> that represents the menu item.</param>
        /// <param name="eventArgs">The event arguments.</param>
        private void InvokeExcludeItem(object sender, EventArgs eventArgs)
        {
            Param.AssertNotNull(sender, "sender");
            Param.Ignore(eventArgs);

            StyleCopTrace.In(sender, eventArgs);

            // This is called from the solution Explorer context menu
            OleMenuCommand menuCommand = (OleMenuCommand)sender;

            CommandSet.CheckMenuItemValidity(menuCommand);

            ProjectUtilities.SetItemExcluded(AnalysisType.Item, true);

            StyleCopTrace.Out();
        }