Beispiel #1
0
        public GeneralAppSettingsPage(IThemeServiceImpl themeService, IWindowsExplorerIntegrationService windowsExplorerIntegrationService, IDocumentTabServiceSettings documentTabServiceSettings, DocumentTreeViewSettingsImpl documentTreeViewSettings, IDsDocumentServiceSettings documentServiceSettings, AppSettingsImpl appSettings, MessageBoxService messageBoxService)
        {
            if (appSettings == null)
            {
                throw new ArgumentNullException(nameof(appSettings));
            }
            this.themeService = themeService ?? throw new ArgumentNullException(nameof(themeService));
            this.windowsExplorerIntegrationService = windowsExplorerIntegrationService ?? throw new ArgumentNullException(nameof(windowsExplorerIntegrationService));
            this.documentTabServiceSettings        = documentTabServiceSettings ?? throw new ArgumentNullException(nameof(documentTabServiceSettings));
            this.documentTreeViewSettings          = documentTreeViewSettings ?? throw new ArgumentNullException(nameof(documentTreeViewSettings));
            this.documentServiceSettings           = documentServiceSettings ?? throw new ArgumentNullException(nameof(documentServiceSettings));
            this.messageBoxService = messageBoxService ?? throw new ArgumentNullException(nameof(messageBoxService));

            ThemesVM = new ObservableCollection <ThemeVM>(themeService.VisibleThemes.Select(a => new ThemeVM(a)));
            if (!ThemesVM.Any(a => a.Theme == themeService.Theme))
            {
                ThemesVM.Add(new ThemeVM(themeService.Theme));
            }
            SelectedThemeVM = ThemesVM.FirstOrDefault(a => a.Theme == themeService.Theme);
            Debug.Assert(SelectedThemeVM != null);

            WindowsExplorerIntegration = windowsExplorerIntegrationService.WindowsExplorerIntegration;
            DecompileFullType          = documentTabServiceSettings.DecompileFullType;
            RestoreTabs          = documentTabServiceSettings.RestoreTabs;
            DeserializeResources = documentTreeViewSettings.DeserializeResources;
            UseMemoryMappedIO    = documentServiceSettings.UseMemoryMappedIO;
            UseNewRendererVM     = new UseNewRendererVM(appSettings);
        }
Beispiel #2
0
 public DsDocumentService(IDsDocumentServiceSettings documentServiceSettings, [ImportMany] IDsDocumentProvider[] documentProviders)
 {
     this.lockObj           = new object();
     this.documents         = new List <IDsDocument>();
     this.tempCache         = new List <IDsDocument>();
     this.AssemblyResolver  = new AssemblyResolver(this);
     this.documentProviders = documentProviders.OrderBy(a => a.Order).ToArray();
     this.Settings          = documentServiceSettings;
 }
Beispiel #3
0
 public DsDocumentService(IDsDocumentServiceSettings documentServiceSettings, [ImportMany] IDsDocumentProvider[] documentProviders)
 {
     rwLock                 = new ReaderWriterLockSlim(LockRecursionPolicy.NoRecursion);
     documents              = new List <DocumentInfo>();
     tempCache              = new List <IDsDocument>();
     AssemblyResolver       = new AssemblyResolver(this);
     this.documentProviders = documentProviders.OrderBy(a => a.Order).ToArray();
     Settings               = documentServiceSettings;
 }
		GeneralAppSettingsPageProvider(IThemeServiceImpl themeService, IWindowsExplorerIntegrationService windowsExplorerIntegrationService, IDocumentTabServiceSettings documentTabServiceSettings, DocumentTreeViewSettingsImpl documentTreeViewSettings, IDsDocumentServiceSettings documentServiceSettings, AppSettingsImpl appSettings, MessageBoxService messageBoxService) {
			this.themeService = themeService;
			this.windowsExplorerIntegrationService = windowsExplorerIntegrationService;
			this.documentTabServiceSettings = documentTabServiceSettings;
			this.documentTreeViewSettings = documentTreeViewSettings;
			this.documentServiceSettings = documentServiceSettings;
			this.appSettings = appSettings;
			this.messageBoxService = messageBoxService;
		}
Beispiel #5
0
 public DsDocumentService(IDsDocumentServiceSettings documentServiceSettings, [ImportMany] IDsDocumentProvider[] documentProviders, [ImportMany] Lazy <IRuntimeAssemblyResolver, IRuntimeAssemblyResolverMetadata>[] runtimeAsmResolvers)
 {
     rwLock                 = new ReaderWriterLockSlim(LockRecursionPolicy.NoRecursion);
     documents              = new List <DocumentInfo>();
     tempCacheLock          = new object();
     tempCache              = new HashSet <IDsDocument>();
     assemblyResolver       = new AssemblyResolver(this, runtimeAsmResolvers.OrderBy(a => a.Metadata.Order).ToArray());
     this.documentProviders = documentProviders.OrderBy(a => a.Order).ToArray();
     Settings               = documentServiceSettings;
 }
Beispiel #6
0
 GeneralAppSettingsPageProvider(IThemeServiceImpl themeService, IWindowsExplorerIntegrationService windowsExplorerIntegrationService, IDocumentTabServiceSettings documentTabServiceSettings, DocumentTreeViewSettingsImpl documentTreeViewSettings, IDsDocumentServiceSettings documentServiceSettings, AppSettingsImpl appSettings, MessageBoxService messageBoxService)
 {
     this.themeService = themeService;
     this.windowsExplorerIntegrationService = windowsExplorerIntegrationService;
     this.documentTabServiceSettings        = documentTabServiceSettings;
     this.documentTreeViewSettings          = documentTreeViewSettings;
     this.documentServiceSettings           = documentServiceSettings;
     this.appSettings       = appSettings;
     this.messageBoxService = messageBoxService;
 }
 DsDocumentServiceProvider(IDsDocumentServiceSettings documentServiceSettings, [ImportMany] IDsDocumentProvider[] documentProviders)
 {
     this.documentServiceSettings = documentServiceSettings;
     this.documentProviders       = documentProviders.ToArray();
 }
		public GeneralAppSettingsPage(IThemeServiceImpl themeService, IWindowsExplorerIntegrationService windowsExplorerIntegrationService, IDocumentTabServiceSettings documentTabServiceSettings, DocumentTreeViewSettingsImpl documentTreeViewSettings, IDsDocumentServiceSettings documentServiceSettings, AppSettingsImpl appSettings, MessageBoxService messageBoxService) {
			if (themeService == null)
				throw new ArgumentNullException(nameof(themeService));
			if (windowsExplorerIntegrationService == null)
				throw new ArgumentNullException(nameof(windowsExplorerIntegrationService));
			if (documentTabServiceSettings == null)
				throw new ArgumentNullException(nameof(documentTabServiceSettings));
			if (documentTreeViewSettings == null)
				throw new ArgumentNullException(nameof(documentTreeViewSettings));
			if (documentServiceSettings == null)
				throw new ArgumentNullException(nameof(documentServiceSettings));
			if (appSettings == null)
				throw new ArgumentNullException(nameof(appSettings));
			if (messageBoxService == null)
				throw new ArgumentNullException(nameof(messageBoxService));
			this.themeService = themeService;
			this.windowsExplorerIntegrationService = windowsExplorerIntegrationService;
			this.documentTabServiceSettings = documentTabServiceSettings;
			this.documentTreeViewSettings = documentTreeViewSettings;
			this.documentServiceSettings = documentServiceSettings;
			this.messageBoxService = messageBoxService;

			ThemesVM = new ObservableCollection<ThemeVM>(themeService.VisibleThemes.Select(a => new ThemeVM(a)));
			if (!ThemesVM.Any(a => a.Theme == themeService.Theme))
				ThemesVM.Add(new ThemeVM(themeService.Theme));
			SelectedThemeVM = ThemesVM.FirstOrDefault(a => a.Theme == themeService.Theme);
			Debug.Assert(SelectedThemeVM != null);

			WindowsExplorerIntegration = windowsExplorerIntegrationService.WindowsExplorerIntegration;
			DecompileFullType = documentTabServiceSettings.DecompileFullType;
			RestoreTabs = documentTabServiceSettings.RestoreTabs;
			DeserializeResources = documentTreeViewSettings.DeserializeResources;
			UseMemoryMappedIO = documentServiceSettings.UseMemoryMappedIO;
			UseNewRendererVM = new UseNewRendererVM(appSettings);
		}
		DsDocumentServiceProvider(IDsDocumentServiceSettings documentServiceSettings, [ImportMany] IDsDocumentProvider[] documentProviders) {
			this.documentServiceSettings = documentServiceSettings;
			this.documentProviders = documentProviders.ToArray();
		}
 DsDocumentServiceProvider(IDsDocumentServiceSettings documentServiceSettings, [ImportMany] IDsDocumentProvider[] documentProviders, [ImportMany] Lazy <IRuntimeAssemblyResolver, IRuntimeAssemblyResolverMetadata>[] runtimeAsmResolvers)
 {
     this.documentServiceSettings = documentServiceSettings;
     this.documentProviders       = documentProviders;
     this.runtimeAsmResolvers     = runtimeAsmResolvers;
 }