Exemple #1
0
        private void ConfigureServices()
        {
            _services = new VsServiceManager(this);

            _services.AddService(_coreServices);
            _services.AddService(_settings);

            _services.AddService(typeof(MicrosoftRClientInstaller));
            // TODO: add more
        }
Exemple #2
0
 private void ConfigureServices()
 {
     _services
     .AddService <IActionLog>(s => new Logger(VsApplication.Name, Path.GetTempPath(), s))
     .AddService <IMainThread, VsMainThread>()
     .AddService <IMicrosoftRClientInstaller, MicrosoftRClientInstaller>()
     .AddService <IOutputService, VsOutputService>()
     .AddService <ISettingsStorage, VsSettingsStorage>()
     .AddService <IRSettings, RSettingsImplementation>()
     .AddService <ITaskService, VsTaskService>()
     .AddService <ITelemetryService, VsTelemetryService>()
     .AddService <ISecurityService, WindowsSecurityService>();
 }
Exemple #3
0
 private void ConfigureServices()
 {
     _services
     .AddService <IActionLog>(s => new Logger(VsApplication.Name, Path.GetTempPath(), s))
     .AddService <IFileSystem, WindowsFileSystem>()
     .AddService <ILoggingPermissions, LoggingPermissions>()
     .AddService <IMainThread, VsMainThread>()
     .AddService <IMicrosoftRClientInstaller, MicrosoftRClientInstaller>()
     .AddService <IProcessServices, ProcessServices>()
     .AddService <IRegistry, RegistryImpl>()
     .AddService <ISettingsStorage, VsSettingsStorage>()
     .AddService <IRSettings, RSettingsImplementation>()
     .AddService <ISecurityService, SecurityService>()
     .AddService <ITaskService, VsTaskService>()
     .AddService <ITelemetryService, VsTelemetryService>();
 }
Exemple #4
0
        private void ConfigureServices()
        {
            var platformServices   = new VsPlatformServices();
            var telemetry          = new VsTelemetryService();
            var componentModel     = (IComponentModel)VsPackage.GetGlobalService(typeof(SComponentModel));
            var loggingPermissions = new LoggingPermissions(platformServices, telemetry, new RegistryImpl());
            var settings           = new RToolsSettingsImplementation(this, new VsSettingsStorage(), loggingPermissions);
            var compositionCatalog = new CompositionCatalog(componentModel.DefaultCompositionService, componentModel.DefaultExportProvider);
            var exportProvider     = componentModel.DefaultExportProvider;

            _services
            .AddService(componentModel)
            .AddService(componentModel.DefaultCompositionService)
            .AddService(exportProvider)
            .AddService(compositionCatalog)
            .AddService(new VsMainThread())
            .AddService(new VsTaskService())
            .AddService(_idleTimeService)
            .AddService(new VsUIServices(this))
            .AddService(new SecurityService(this))
            .AddService(loggingPermissions)
            .AddService(new Logger(ApplicationName, Path.GetTempPath(), loggingPermissions))
            .AddService(platformServices)
            .AddService(settings)
            .AddService(new REditorSettings(new LanguageSettingsStorage(this, RGuidList.RLanguageServiceGuid, RGuidList.RPackageGuid, new string[] { RPackage.ProductName })))
            .AddService(new ImageService(exportProvider.GetExportedValue <IGlyphService>()))
            .AddService(new VsEditorSupport(this))
            .AddService(telemetry)
            .AddService(new FileSystem())
            .AddService(new ProcessServices())
            .AddService(new RegistryImpl())
            .AddService(new MicrosoftRClientInstaller())
            .AddWindowsRInterpretersServices()
            .AddWindowsHostClientServices();
            // TODO: add more

            settings.LoadSettings();
        }