public DataFormGenerator(DTE2 dte2) { Microsoft.VisualStudio.Shell.ThreadHelper.ThrowIfNotOnUIThread(); if (dte2 == null) { throw new ArgumentNullException(nameof(dte2)); } _dte2 = dte2; _activeProject = dte2.ActiveDocument.ActiveWindow.Project; _projectType = AssemblyAssistant.GetProjectType(dte2.ActiveDocument.ActiveWindow.Project); _projectFrameworkVersion = AssemblyAssistant.GetProjectFrameworkVersion(dte2.ActiveDocument.ActiveWindow.Project); }
public DataFormGenerator(DTE2 dte2, Project activeProject) { _dte2 = dte2; _activeProject = activeProject; if (dte2 == null) { throw new ArgumentNullException(nameof(dte2)); } if (activeProject == null) { throw new ArgumentNullException(nameof(activeProject)); } _projectType = AssemblyAssistant.GetProjectType(dte2.ActiveDocument.ActiveWindow.Project); _projectFrameworkVersion = AssemblyAssistant.GetProjectFrameworkVersion(dte2.ActiveDocument.ActiveWindow.Project); }