本文整理汇总了C#中IVisualStudioService类的典型用法代码示例。如果您正苦于以下问题:C# IVisualStudioService类的具体用法?C# IVisualStudioService怎么用?C# IVisualStudioService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IVisualStudioService类属于命名空间,在下文中一共展示了IVisualStudioService类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AutoLinkerService
public AutoLinkerService(DTE2 visualStudio, IConfigurationService configurationService, IVisualStudioService visualStudioService)
{
Argument.IsNotNull("visualStudio", visualStudio);
Argument.IsNotNull("configurationService", configurationService);
Argument.IsNotNull("visualStudioService", visualStudioService);
_visualStudio = visualStudio;
_configurationService = configurationService;
_visualStudioService = visualStudioService;
var events = (Events2)_visualStudio.Events;
_solutionEvents = events.SolutionEvents;
_solutionEvents.Opened += OnSolutionOpened;
_solutionEvents.AfterClosing += OnSolutionClosed;
_solutionItemsEvents = events.MiscFilesEvents;
_solutionItemsEvents.ItemAdded += OnSolutionItemAdded;
_solutionItemsEvents.ItemRemoved += OnSolutionItemRemoved;
_solutionItemsEvents.ItemRenamed += OnSolutionItemRenamed;
_projectItemsEvents = events.ProjectItemsEvents;
_projectItemsEvents.ItemAdded += OnSolutionItemAdded;
_projectItemsEvents.ItemRemoved += OnSolutionItemRemoved;
_projectItemsEvents.ItemRenamed += OnSolutionItemRenamed;
}
示例2: ProjectsController
/// <summary>
/// Initializes a new instance of the <see cref="ProjectsController" /> class.
/// </summary>
/// <param name="configurationService">The configuration service.</param>
/// <param name="projectsService">The projects service.</param>
/// <param name="nugetService">The nuget service.</param>
/// <param name="visualStudioService">The visual studio service.</param>
/// <param name="readMeService">The read me service.</param>
/// <param name="settingsService">The settings service.</param>
/// <param name="messageBoxService">The message box service.</param>
/// <param name="mockingServiceFactory">The mocking service factory.</param>
/// <param name="resolverService">The resolver service.</param>
/// <param name="viewModelViewsService">The view model views service.</param>
/// <param name="viewModelAndViewsFactory">The view model and views factory.</param>
public ProjectsController(
IConfigurationService configurationService,
IProjectsService projectsService,
INugetService nugetService,
IVisualStudioService visualStudioService,
IReadMeService readMeService,
ISettingsService settingsService,
IMessageBoxService messageBoxService,
IMockingServiceFactory mockingServiceFactory,
IResolverService resolverService,
IViewModelViewsService viewModelViewsService,
IViewModelAndViewsFactory viewModelAndViewsFactory)
: base(configurationService,
visualStudioService,
readMeService,
settingsService,
messageBoxService,
resolverService)
{
TraceService.WriteLine("ProjectsController::Constructor");
this.projectsService = projectsService;
this.nugetService = nugetService;
this.viewModelViewsService = viewModelViewsService;
this.viewModelAndViewsFactory = viewModelAndViewsFactory;
this.mockingService = mockingServiceFactory.GetMockingService();
}
示例3: PluginsViewModel
/// <summary>
/// Initializes a new instance of the <see cref="PluginsViewModel" /> class.
/// </summary>
/// <param name="settingsService">The settings service.</param>
/// <param name="visualStudioService">The visual studio service.</param>
/// <param name="pluginFactory">The plugin factory.</param>
public PluginsViewModel(
ISettingsService settingsService,
IVisualStudioService visualStudioService,
IPluginFactory pluginFactory)
: base(settingsService)
{
TraceService.WriteLine("PluginsViewModel::Constructor Start");
this.settingsService = settingsService;
this.visualStudioService = visualStudioService;
Plugins allPlugins = pluginFactory.GetPlugins(this.settingsService.MvvmCrossPluginsUri);
this.corePlugins = this.GetPlugins(allPlugins, false);
this.communityPlugins = this.GetPlugins(allPlugins, true);
if (this.corePlugins.Any() == false &&
this.communityPlugins.Any())
{
this.CommunityPluginsSelected = true;
}
else
{
this.CorePluginsSelected = true;
}
TraceService.WriteLine("PluginsViewModel::Constructor End");
}
示例4: PluginsController
/// <summary>
/// Initializes a new instance of the <see cref="PluginsController" /> class.
/// </summary>
/// <param name="fileSystem">The file system.</param>
/// <param name="pluginsService">The plugins service.</param>
/// <param name="nugetService">The nuget service.</param>
/// <param name="visualStudioService">The visual studio service.</param>
/// <param name="readMeService">The read me service.</param>
/// <param name="settingsService">The settings service.</param>
/// <param name="messageBoxService">The message box service.</param>
/// <param name="dialogService">The dialog service.</param>
/// <param name="formsService">The forms service.</param>
/// <param name="translator">The translator.</param>
public PluginsController(
IFileSystem fileSystem,
IPluginsService pluginsService,
INugetService nugetService,
IVisualStudioService visualStudioService,
IReadMeService readMeService,
ISettingsService settingsService,
IMessageBoxService messageBoxService,
IDialogService dialogService,
IFormsService formsService,
ITranslator<Tuple<DirectoryInfoBase, DirectoryInfoBase>, Plugins> translator)
: base(visualStudioService,
readMeService,
settingsService,
messageBoxService,
dialogService,
formsService)
{
TraceService.WriteLine("PluginsController::Constructor");
this.fileSystem = fileSystem;
this.pluginsService = pluginsService;
this.nugetService = nugetService;
this.translator = translator;
}
示例5: ProjectFactory
/// <summary>
/// Initializes a new instance of the <see cref="ProjectFactory" /> class.
/// </summary>
/// <param name="visualStudioService">The visual studio service.</param>
/// <param name="settingsService">The settings service.</param>
public ProjectFactory(
IVisualStudioService visualStudioService,
ISettingsService settingsService)
{
this.visualStudioService = visualStudioService;
this.settingsService = settingsService;
}
示例6: ViewModelAndViewsFactory
/// <summary>
/// Initializes a new instance of the <see cref="ViewModelAndViewsFactory" /> class.
/// </summary>
/// <param name="visualStudioService">The visual studio service.</param>
/// <param name="settingsService">The settings service.</param>
public ViewModelAndViewsFactory(
IVisualStudioService visualStudioService,
ISettingsService settingsService)
{
this.visualStudioService = visualStudioService;
this.settingsService = settingsService;
}
示例7: BaseController
/// <summary>
/// Initializes a new instance of the <see cref="BaseController" /> class.
/// </summary>
/// <param name="visualStudioService">The visual studio service.</param>
/// <param name="readMeService">The read me service.</param>
/// <param name="settingsService">The settings service.</param>
/// <param name="messageBoxService">The message box service.</param>
/// <param name="dialogService">The dialog service.</param>
/// <param name="formsService">The forms service.</param>
protected BaseController(
IVisualStudioService visualStudioService,
IReadMeService readMeService,
ISettingsService settingsService,
IMessageBoxService messageBoxService,
IDialogService dialogService,
IFormsService formsService)
{
//// init the tracing service first!
TraceService.Initialize(
settingsService.LogToTrace,
false, //// log to console.
settingsService.LogToFile,
settingsService.LogFilePath,
settingsService.DisplayErrors);
TraceService.WriteLine("BaseController::Constructor");
this.VisualStudioService = visualStudioService;
this.ReadMeService = readMeService;
this.SettingsService = settingsService;
this.MessageBoxService = messageBoxService;
this.DialogService = dialogService;
this.FormsService = formsService;
}
示例8: FileOperationService
/// <summary>
/// Initializes a new instance of the <see cref="FileOperationService" /> class.
/// </summary>
/// <param name="visualStudioService">The visual studio service.</param>
/// <param name="settingsService">The settings service.</param>
public FileOperationService(
IVisualStudioService visualStudioService,
ISettingsService settingsService)
{
this.visualStudioService = visualStudioService;
this.settingsService = settingsService;
}
示例9: ProjectTemplateTranslator
/// <summary>
/// Initializes a new instance of the <see cref="ProjectTemplateTranslator" /> class.
/// </summary>
/// <param name="settingsService">The settings service.</param>
/// <param name="visualStudioService">The visual studio service.</param>
public ProjectTemplateTranslator(
ISettingsService settingsService,
IVisualStudioService visualStudioService)
{
this.settingsService = settingsService;
this.visualStudioService = visualStudioService;
}
示例10: AddRuleViewModel
/// <summary>
/// Initializes a new instance of the <see cref="AddRuleViewModel" /> class.
/// </summary>
/// <param name="configuration">The configuration.</param>
/// <param name="visualStudioService">The visual studio service.</param>
/// <exception cref="ArgumentNullException">The <paramref name="configuration" /> is <c>null</c>.</exception>
/// <exception cref="ArgumentNullException">The <paramref name="visualStudioService" /> is <c>null</c>.</exception>
public AddRuleViewModel(IConfiguration configuration, IVisualStudioService visualStudioService)
{
Argument.IsNotNull(() => configuration);
Argument.IsNotNull(() => visualStudioService);
_configuration = configuration;
AvailableProjects = new List<string>();
AvailableProjects.AddRange(from project in visualStudioService.GetAllProjects()
select project.Name);
RootProject = visualStudioService.GetCurrentProject().Name;
ItemsToAdd = new List<string>(visualStudioService.GetSelectedItems());
RuleTypes = Enum<RuleType>.ToList();
ProjectTypes = new ObservableCollection<SelectableProjectType>();
foreach (var projectType in ProjectTypeHelper.GetAvailableProjectTypes())
{
var selectableProjectType = new SelectableProjectType(projectType);
this.SubscribeToWeakPropertyChangedEvent(selectableProjectType, OnSelectableProjectTypePropertyChanged);
ProjectTypes.Add(selectableProjectType);
}
}
示例11: AddPlugins
/// <summary>
/// Adds the plugins.
/// </summary>
/// <param name="visualStudioService">The visual studio service.</param>
/// <param name="plugins">The plugins.</param>
/// <param name="viewModelName">Name of the view model.</param>
/// <param name="createUnitTests">if set to <c>true</c> [create unit tests].</param>
/// <returns>
/// The messages.
/// </returns>
public IEnumerable<string> AddPlugins(
IVisualStudioService visualStudioService,
IEnumerable<Plugin> plugins,
string viewModelName,
bool createUnitTests)
{
TraceService.WriteLine("PluginsService::AddPlugins viewModelName=" + viewModelName);
this.InitNuget(NinjaMessages.PluginsViaNuget);
IProjectService coreProjectService = visualStudioService.CoreProjectService;
Plugin[] enumerablePlugins = plugins as Plugin[] ?? plugins.ToArray();
this.AddProjectPlugins(coreProjectService, enumerablePlugins, Settings.Core, Settings.Core);
this.AddProjectPlugins(visualStudioService.DroidProjectService, enumerablePlugins, Settings.Droid, Settings.Droid);
this.AddProjectPlugins(visualStudioService.iOSProjectService, enumerablePlugins, Settings.iOS, "Touch");
this.AddProjectPlugins(visualStudioService.WindowsPhoneProjectService, enumerablePlugins, Settings.WindowsPhone, Settings.WindowsPhone);
this.AddProjectPlugins(visualStudioService.WindowsStoreProjectService, enumerablePlugins, Settings.WindowsStore, Settings.WindowsStore);
this.AddProjectPlugins(visualStudioService.WpfProjectService, enumerablePlugins, Settings.Wpf, Settings.Wpf);
if (string.IsNullOrEmpty(viewModelName) == false)
{
this.AddToViewModel(visualStudioService, viewModelName, createUnitTests, coreProjectService, enumerablePlugins);
}
return this.Messages;
}
示例12: RootProjectViewModel
/// <summary>
/// Initializes a new instance of the <see cref="RootProjectViewModel" /> class.
/// </summary>
/// <param name="rootProject">The root project.</param>
/// <param name="visualStudioService">The visual studio service.</param>
/// <param name="uiVisualizerService">The UI visualizer service.</param>
/// <param name="messageService">The message service.</param>
/// <exception cref="ArgumentNullException">The <paramref name="rootProject" /> is <c>null</c>.</exception>
public RootProjectViewModel(RootProject rootProject, IVisualStudioService visualStudioService, IUIVisualizerService uiVisualizerService,
IMessageService messageService)
{
Argument.IsNotNull(() => rootProject);
Argument.IsNotNull(() => visualStudioService);
Argument.IsNotNull(() => uiVisualizerService);
Argument.IsNotNull(() => messageService);
_uiVisualizerService = uiVisualizerService;
_messageService = messageService;
AvailableProjects = new List<string>();
var availableProjects = visualStudioService.GetAllProjects();
foreach (var availableProject in availableProjects)
{
AvailableProjects.Add(availableProject.Name);
}
RootProject = rootProject;
Add = new Command(OnAddExecute, OnAddCanExecute);
Edit = new Command(OnEditExecute, OnEditCanExecute);
Remove = new Command(OnRemoveExecute, OnRemoveCanExecute);
}
示例13: TokensTranslator
/// <summary>
/// Initializes a new instance of the <see cref="TokensTranslator"/> class.
/// </summary>
public TokensTranslator(
IVisualStudioService visualStudioService,
ISettingsService settingsService)
{
this.visualStudioService = visualStudioService;
this.settingsService = settingsService;
}
示例14: SearchViewModel
public SearchViewModel(IVisualStudioService visualStudioService, IRegexService regexService)
{
this._visualStudioService = visualStudioService;
this._regexService = regexService;
DuplicatesInLayoutAndFile = new ObservableCollection<ParentChildDuplicates>();
DuplicatesInSameFile = new ObservableCollection<Page>();
}
示例15: SearchViewModel
public SearchViewModel(IVisualStudioService visualStudioService, IRegexService regexService, IPagesService pagesService)
{
this._visualStudioService = visualStudioService;
this._regexService = regexService;
this._pagesService = pagesService;
Results = new ObservableCollection<Result>();
}