Exemplo n.º 1
0
 public ProjectReloadManager(IProjectThreadingService threadHandling, [Import(typeof(SVsServiceProvider))] IServiceProvider serviceProvider, IUserNotificationServices userNotificationServices,
                             IDialogServices dialogServices)
     : base(threadHandling.JoinableTaskContext)
 {
     _threadHandling           = threadHandling;
     _serviceProvider          = serviceProvider;
     _userNotificationServices = userNotificationServices;
     _dialogServices           = dialogServices;
 }
Exemplo n.º 2
0
 public LayoutFileDefinitionBuilderViewModel(ISkinDefinitionSerializer serializer,
                                             IFileSystemManager fileSystemManager,
                                             IDialogServices dialogServices)
 {
     this.Serializer        = serializer;
     this.FileSystemManager = fileSystemManager;
     this.DialogServices    = dialogServices;
     this.SelectFileCommand = new Command(SelectFile);
 }
Exemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the MainWindowViewModelAccessor class.
 /// </summary>
 /// <param name="assemblySettings">The assembly settings for the running assembly.</param>
 /// <param name="cultureSettings">The culture settings for the running assembly.</param>
 /// <param name="dialogServices">The dialog services for the running assembly.</param>
 public MainWindowViewModelAccessor(
     IAssemblySettings assemblySettings,
     ICultureSettings cultureSettings,
     IDialogServices dialogServices) :
     base(
         assemblySettings,
         cultureSettings,
         dialogServices)
 {
 }
Exemplo n.º 4
0
        /// <summary>
        /// Initializes a new instance of the MainWindowViewModel class.
        /// </summary>
        /// <param name="assemblySettings">The assembly settings for the running assembly.</param>
        /// <param name="cultureSettings">The culture settings for the running assembly.</param>
        /// <param name="dialogServices">The dialog services for the running assembly.</param>
        public MainWindowViewModel(
            IAssemblySettings assemblySettings,
            ICultureSettings cultureSettings,
            IDialogServices dialogServices)
        {
            this.settings         = Settings.Default;
            this.AssemblySettings = assemblySettings;
            this.CultureSettings  = cultureSettings;
            this.DialogServices   = dialogServices;

            // Initialize the data from the settings.
            this.PortName           = this.PortName;
            this.BluetoothAddresses = this.BluetoothAddresses;
            this.DiscoveryTimeout   = this.DiscoveryTimeout;

            this.InitializeAtPort();
        }
Exemplo n.º 5
0
        private static DotNetCoreProjectCompatibilityDetector CreateCompatibilityDetector(out IDialogServices dialogServices,
                                                                                          string versionDataString      = null,
                                                                                          Version vsVersion             = null,
                                                                                          bool isSolutionOpen           = false,
                                                                                          bool hasNewProjects           = false,
                                                                                          bool usingPreviewSDK          = false,
                                                                                          string targetFrameworkMoniker = ".NETCoreApp,Version=v3.0")
        {
            dialogServices = IDialogServicesFactory.Create();
            var additionalReference = dialogServices;
            var projectProperties   = IProjectPropertiesFactory.CreateWithPropertyAndValue("TargetFrameworkMoniker", targetFrameworkMoniker);
            var propertiesProvider  = IProjectPropertiesProviderFactory.Create(commonProps: projectProperties);
            var project             = ConfiguredProjectFactory.Create(services: ConfiguredProjectServicesFactory.Create(projectPropertiesProvider: propertiesProvider));
            var scope                  = hasNewProjects ? IProjectCapabilitiesScopeFactory.Create(new[] { ProjectCapability.DotNet, ProjectCapability.PackageReferences }) : null;
            var projectAccessor        = new Lazy <IProjectServiceAccessor>(() => IProjectServiceAccessorFactory.Create(scope, project));
            var lazyDialogServices     = new Lazy <IDialogServices>(() => additionalReference);
            var threadHandling         = new Lazy <IProjectThreadingService>(() => IProjectThreadingServiceFactory.Create(verifyOnUIThread: false));
            var vsShellUtilitiesHelper = new Lazy <IVsShellUtilitiesHelper>(() => IVsShellUtilitiesHelperFactory.Create(string.Empty, vsVersion ?? new Version("16.1")));
            var fileSystem             = new Lazy <IFileSystem>(() => IFileSystemFactory.Create(existsFunc: x => true, readAllTextFunc: x => versionDataString ?? defaultVersionDataString));
            var httpClient             = new Lazy <IHttpClient>(() => IHttpClientFactory.Create(versionDataString ?? defaultVersionDataString));
            var vsUIShellService       = IVsServiceFactory.Create <SVsUIShell, IVsUIShell>(Mock.Of <IVsUIShell>());
            var settingsManagerService = IVsServiceFactory.Create <SVsSettingsPersistenceManager, ISettingsManager>(Mock.Of <ISettingsManager>());
            var vsSolutionService      = IVsServiceFactory.Create <SVsSolution, IVsSolution>(IVsSolutionFactory.CreateWithAdviseUnadviseSolutionEvents(1, isFullyLoaded: isSolutionOpen));
            var vsAppIdService         = IVsServiceFactory.Create <SVsAppId, IVsAppId>(Mock.Of <IVsAppId>());
            var vsShellService         = IVsServiceFactory.Create <SVsShell, IVsShell>(Mock.Of <IVsShell>());

            var compatibilityDetector = new TestDotNetCoreProjectCompatibilityDetector(projectAccessor,
                                                                                       lazyDialogServices,
                                                                                       threadHandling,
                                                                                       vsShellUtilitiesHelper,
                                                                                       fileSystem,
                                                                                       httpClient,
                                                                                       vsUIShellService,
                                                                                       settingsManagerService,
                                                                                       vsSolutionService,
                                                                                       vsAppIdService,
                                                                                       vsShellService,
                                                                                       hasNewProjects,
                                                                                       usingPreviewSDK);

            return(compatibilityDetector);
        }
Exemplo n.º 6
0
 public MultiSelectValueEditor(IDialogServices dialogServices)
 {
     _dialogServices = dialogServices;
     SelectCommand   = new Command(Select);
 }