Beispiel #1
0
        private void ShowAddTestWindow(MethodsInspector methodsInspector, TextViewSelection selection)
        {
            var documentationControl = new AddTestWindow(methodsInspector);

            documentationControl.DataContext = new EditViewModel(selection);
            documentationControl.ShowDialog();
        }
Beispiel #2
0
        /// <summary>
        /// This function is the callback used to execute the command when the menu item is clicked.
        /// See the constructor to see how the menu item is associated with this function using
        /// OleMenuCommandService service and MenuCommand class.
        /// </summary>
        /// <param name="sender">Event sender.</param>
        /// <param name="e">Event args.</param>
        private void MenuItemCallback(object sender, EventArgs e)
        {
            TextViewSelection selection          = GetSelection(ServiceProvider);
            string            activeDocumentName = GetActiveDocumentFileName(ServiceProvider);
            var activeDllPath   = GetActiveDocumentAssemblyPath(ServiceProvider);
            var methodInspector = new MethodsInspector(activeDocumentName, selection.Text, activeDllPath);

            methodInspector.SolutionFilePath = GetSolutionFilePath(ServiceProvider);
            ShowAddTestWindow(methodInspector, selection);
        }