test/Misc/EFTools/TestInfrastructure/VS/DesignerUtilities.cs
/// <summary>
///     Invoke menu action for the given menu item using specified operation type
/// </summary>
/// <param name="dte">The DTE object</param>
/// <param name="menuItem">The menu item</param>
/// <param name="operationType">The type of the operation, i.e., via menu command or keyboard</param>
Invoke menu action for the given menu item using specified operation type
Invoke menu action for the given menu item using specified operation type
public static void Invoke(DTE dte, MenuItem menuItem, OperationType operationType)
            {
                switch (operationType)
                {
                    case OperationType.MenuCommand:
                        dte.ExecuteCommand(CommandStrings[menuItem], string.Empty);
                        break;
                    case OperationType.Keyboard:
                        throw new NotSupportedException("OperationType");
                    default:
                        throw new NotSupportedException("OperationType");
                }
            }
public static void Invoke ( DTE dte , MenuItem menuItem , OperationType operationType ) { switch ( operationType ) { case OperationType . MenuCommand : dte . ExecuteCommand ( CommandStrings [ menuItem ] , string . Empty ) ; break ; case OperationType . Keyboard : throw new NotSupportedException ( " " ) ; default : throw new NotSupportedException ( " " ) ; } }
Invoke menu action for the given menu item using specified operation type
Invoke menu action for the given menu item using specified operation type
// TODO: This is not stable right now and might cause rolling build failure. // So it is just a placeholder for now. // SendKeys.SendWait(KeyStrokes[menuItem]); // TODO: throwing an exception if not used should be removed // otherwise fix verify and remove the other TODO
dte
DTE
The DTE object
The DTE object
menuItem
MenuItem
The menu item
The menu item
operationType
OperationType
The type of the operation, i.e., via menu command or keyboard
The type of the operation i . e . via menu command or keyboard