示例#1
0
 public GetMetadataQueryHandler(
     IAssemblyService assemblyService,
     IServiceProvider serviceProvider)
 {
     _assemblyService = assemblyService;
     _serviceProvider = serviceProvider;
 }
 public TargetThemeAssemblyProjectContext(IProjectContext sourceContext, IAssembly targetAssembly, IAssemblyService assemblyService)
 {
     this.sourceContext   = sourceContext;
     this.targetAssembly  = targetAssembly;
     this.assemblyService = assemblyService;
     this.Initialize(sourceContext.Platform.Metadata);
 }
示例#3
0
        public AssemblyControllerTest()
        {
            mockAssemblyService = new MockAssemblyService();
            ILogger <AssemblyController> mockLogger = MockLogger <AssemblyController> .CreateMockLogger();

            assemblyController = new AssemblyController(mockAssemblyService, mockLogger);
        }
示例#4
0
 public SelectTypeViewModel(IAssemblyService assemblyService, IProjectService projectService, Type baseType)
 {
     this._assemblyService = assemblyService;
     this._projectService  = projectService;
     this._baseType        = baseType;
     this.LoadedCommand    = new RelayCommand(async() => await this.OnLoaded());
 }
示例#5
0
 public AssemblyController(IAssemblyService assemblyService, IFileInfoService fileInfoService
                           , IServiceInfoService serviceInfoService)
 {
     _assemblyService    = assemblyService;
     _serviceInfoService = serviceInfoService;
     _fileInfoService    = fileInfoService;
 }
示例#6
0
 public RelationalDbMigrator(IConfiguration configuration, IFileService fileService,
                             IAssemblyService assemblyService, ILogger <RelationalDbMigrator> logger)
 {
     _configuration   = configuration;
     _fileService     = fileService;
     _assemblyService = assemblyService;
     _logger          = logger;
 }
示例#7
0
 /// <summary>
 /// Constructs a new instance of <see cref="DynamicFormService"/>.
 /// </summary>
 /// <param name="assemblyService"></param>
 /// <param name="dynamicFormBuilder"></param>
 public DynamicFormService(IDynamicFormBuilder dynamicFormBuilder,
                           IAssemblyService assemblyService)
 {
     _dynamicFormBuilder = dynamicFormBuilder;
     _assemblyService    = assemblyService;
     _formData           = new ConcurrentDictionary <string, DynamicFormData>();
     _assemblyName       = typeof(DynamicFormService).GetTypeInfo().Assembly.GetName().Name;
 }
示例#8
0
 public void loadServer()
 {
     if (service != null)
     {
         throw new ApplicationException("Server already loaded");
     }
     service = new AssemblyService();
 }
示例#9
0
 public DesktopContextFactory(IDateTimeProvider dateTimeProvider, IDesktopServiceSettings desktopServiceSettings, IReportFilterService reportFilterService, IAssemblyService assemblyService, IReleaseVersionInformationService releaseVersionInformationService)
 {
     _dateTimeProvider                 = dateTimeProvider;
     _desktopServiceSettings           = desktopServiceSettings;
     _reportFilterService              = reportFilterService;
     _assemblyService                  = assemblyService;
     _releaseVersionInformationService = releaseVersionInformationService;
 }
示例#10
0
 public void LoadServer()
 {
     if (service != null)
     {
         throw new ApplicationException("Server already loaded");
     }
     service = AssemblyService.Create(serviceType);
 }
 public ServicesViewModel(IAssemblyService assemblyService, ICultureService cultureService, IAsciiConverterService converter)
 {
     Items = new ObservableCollection <IMyService>(new List <IMyService>
     {
         //assemblyService,
         //cultureService,
         converter,
     });
 }
示例#12
0
 public LoadOtherPlugins(
     IAssemblyService assemblyService,
     IPathService pathService,
     IDirectoryService directoryService)
 {
     _assemblyService  = assemblyService;
     _pathService      = pathService;
     _directoryService = directoryService;
 }
示例#13
0
 public StubRootPathResolver(
     IAssemblyService assemblyService,
     IFileService fileService,
     IOptions <SettingsModel> options)
 {
     _assemblyService = assemblyService;
     _fileService     = fileService;
     _settings        = options.Value;
 }
示例#14
0
        public void Unload()
        {
            KnownProjectBase.MetadataStore        = null;
            ViewNodeManager.EnsureLayoutRequired -= new EventHandler(this.ViewNodeManager_EnsureLayoutRequired);
            XamlPerformanceEvents.UnregisterEvents();
            this.services.RemoveService(typeof(AnnotationService));
            this.annotationService.Shutdown();
            IProjectTypeManager   service              = this.services.GetService <IProjectTypeManager>();
            IDocumentTypeManager  documentTypeManager  = this.services.GetService <IDocumentTypeManager>();
            IWindowService        windowService        = this.services.GetService <IWindowService>();
            IOptionsDialogService optionsDialogService = this.services.GetService <IOptionsDialogService>();

            this.services.GetService <ICommandService>().RemoveTarget(this.commandTarget);
            this.commandTarget = null;
            foreach (Tool tool in this.tools)
            {
                this.designerContext.ToolManager.Remove(tool);
            }
            this.services.RemoveService(typeof(ToolManager));
            this.services.RemoveService(typeof(SnappingEngine));
            this.services.RemoveService(typeof(IAttachedPropertyMetadataFactory));
            this.services.RemoveService(typeof(IOutOfBrowserDeploymentService));
            this.services.GetService <IDesignerDefaultPlatformService>().Dispose();
            this.services.RemoveService(typeof(IDesignerDefaultPlatformService));
            this.services.RemoveService(typeof(IHelpService));
            windowService.RemoveResourceDictionary(this.designSurfaceIcons);
            optionsDialogService.OptionsPages.Remove(this.unitsOptionsPage);
            optionsDialogService.OptionsPages.Remove(this.artboardOptionsPage);
            optionsDialogService.OptionsPages.Remove(this.viewOptionsPage);
            optionsDialogService.OptionsPages.Remove(this.annotationsOptionsPage);
            this.sharedColorSpaceManager.Unload();
            if (windowService.PaletteRegistry["Designer_ProjectPane"] != null)
            {
                ProjectPane content = (ProjectPane)windowService.PaletteRegistry["Designer_ProjectPane"].Content;
            }
            SceneViewModel.UnregisterPipelineTasks(this.services.GetService <ISchedulingService>());
            foreach (IProjectType projectType in this.projectTypes)
            {
                service.Unregister(projectType);
            }
            foreach (IDocumentType documentType in this.documentTypes)
            {
                documentTypeManager.Unregister(documentType);
            }
            this.projectTypes.Clear();
            this.documentTypes.Clear();
            this.designerContext.Uninitialize();
            this.designerContext = null;
            IAssemblyService assemblyService = this.services.GetService <IAssemblyService>();

            assemblyService.UnregisterPlatformResolver("Silverlight");
            assemblyService.UnregisterPlatformResolver(".NETFramework");
            this.silverLightAssemblyResolver.Dispose();
        }
示例#15
0
 public CodeProject(IProject project, IAssemblyService assemblyService, ICodeProjectService codeProjectService, BuildManager buildManager, IViewService viewService, IDocumentTypeManager documentTypeManager)
 {
     this.project               = project;
     this.assemblyService       = assemblyService;
     this.codeProjectService    = codeProjectService;
     this.buildManager          = buildManager;
     this.documentTypeManager   = documentTypeManager;
     this.documentChangeWatcher = new CodeProject.OpenDocumentsChangeWatcher(viewService);
     this.documentChangeWatcher.DocumentClosed += new EventHandler <CodeProject.DocumentChangedEventArgs>(this.DocumentChangeWatcher_DocumentClosed);
     this.documentChangeWatcher.DocumentOpened += new EventHandler <CodeProject.DocumentChangedEventArgs>(this.DocumentChangeWatcher_DocumentOpened);
     this.documentChangeWatcher.InitializeDocuments();
 }
 public SetupGameStuff(IDbContextLocator locator, IDbContextFactory factory,
     INetworkContentSyncer networkContentSyncer, /* ICacheManager cacheMan, */
     IGameLocker gameLocker, IStateHandler stateHandler, IAssemblyService ass) {
     _locator = locator;
     _factory = factory;
     _networkContentSyncer = networkContentSyncer;
     //_cacheMan = cacheMan;
     _gameLocker = gameLocker;
     _stateHandler = stateHandler;
     _timer = new TimerWithElapsedCancellationAsync(TimeSpan.FromMinutes(30), onElapsedNonBool: OnElapsed);
     _gameFactory = new GameFactory(ass);
 }
示例#17
0
 public SetupGameStuff(IDbContextLocator locator, IDbContextFactory factory,
                       INetworkContentSyncer networkContentSyncer, /* ICacheManager cacheMan, */
                       IGameLocker gameLocker, IStateHandler stateHandler, IAssemblyService ass)
 {
     _locator = locator;
     _factory = factory;
     _networkContentSyncer = networkContentSyncer;
     //_cacheMan = cacheMan;
     _gameLocker   = gameLocker;
     _stateHandler = stateHandler;
     _timer        = new TimerWithElapsedCancellationAsync(TimeSpan.FromMinutes(30), onElapsedNonBool: OnElapsed);
     _gameFactory  = new GameFactory(ass);
 }
示例#18
0
 public UpdaterProvider(IApplicationExitProvider applicationExitProvider, IFileService fileService, IDirectoryService directoryService, IWebClientService webClientService, IPathService pathService, IAssemblyService assemblyService, IProcessStarterService processStarterService, IGuidGeneratorService guidGeneratorService, IIsCurrentVersionProvider isCurrentVersionProvider, IGlobalLogService globalLogService)
 {
     this._applicationExitProvider  = applicationExitProvider;
     this._fileService              = fileService;
     this._directoryService         = directoryService;
     this._webClientService         = webClientService;
     this._pathService              = pathService;
     this._assemblyService          = assemblyService;
     this._processStarterService    = processStarterService;
     this._guidGeneratorService     = guidGeneratorService;
     this._isCurrentVersionProvider = isCurrentVersionProvider;
     this._globalLogService         = globalLogService;
 }
示例#19
0
 public ProjectService(
     Serializer serializer,
     IAssemblyService assemblyService,
     IDialogService dialogService,
     ILoggingService loggingService,
     ISceneService sceneService)
 {
     this._serializer      = serializer;
     this._assemblyService = assemblyService;
     this._dialogService   = dialogService;
     this._loggingService  = loggingService;
     this._sceneService    = sceneService;
 }
示例#20
0
 internal CodeProjectService(IProjectManager projectManager, IAssemblyService assemblyService, IMessageDisplayService messageDisplayService, IViewService viewService, IDocumentTypeManager documentTypeManager)
 {
     this.projectManager        = projectManager;
     this.assemblyService       = assemblyService;
     this.messageDisplayService = messageDisplayService;
     this.viewService           = viewService;
     this.documentTypeManager   = documentTypeManager;
     if (this.projectManager == null)
     {
         return;
     }
     this.projectManager.ProjectClosed += new EventHandler <ProjectEventArgs>(this.OnProjectClosed);
 }
示例#21
0
 public ValueEditorService(
     IAssemblyService assemblyService,
     IDialogService dialogService,
     IProjectService projectService,
     ISceneService sceneService,
     IUndoService undoService)
 {
     this._assemblyService = assemblyService;
     this._dialogService   = dialogService;
     this._projectService  = projectService;
     this._sceneService    = sceneService;
     this._undoService     = undoService;
 }
示例#22
0
 public ServiceRegistryService(
     IFileService fileservice,
     IAssemblyService assemblyService,
     ServiceRegistryRepository repo,
     DaoRepository daoRepo,
     AppConf appConf,
     DataSettings dataSettings = null) : base(daoRepo, appConf)
 {
     FileService = fileservice;
     ServiceRegistryRepository = repo;
     AssemblyService           = assemblyService;
     DataSettings          = dataSettings ?? DataSettings.Current;
     AssemblySearchPattern = DefaultConfiguration.GetAppSetting("AssemblySearchPattern", "*.dll");
     _scanResults          = new Dictionary <Type, List <ServiceRegistryContainerRegistrationResult> >();
 }
示例#23
0
 public Assembly ResolveRuntimeAssembly(AssemblyName assemblyName)
 {
     if (this.assemblyResolver == null)
     {
         IAssemblyService assemblyService = (IAssemblyService)this.serviceProvider.GetService(typeof(IAssemblyService));
         if (assemblyService != null)
         {
             this.assemblyResolver = assemblyService.GetPlatformResolver(this.frameworkSpec);
         }
     }
     if (this.assemblyResolver != null)
     {
         return(this.assemblyResolver.ResolveAssembly(assemblyName));
     }
     return((Assembly)null);
 }
示例#24
0
        public static void SetHasExtendedVisualStateManager(SceneNode ownerNode, bool set)
        {
            ProjectContext   projectContext  = ownerNode.ProjectContext as ProjectContext;
            IAssemblyService assemblyService = ownerNode.DesignerContext.AssemblyService;

            if (set)
            {
                if (!VisualStateManagerSceneNode.EnsureExtendedAssemblyReferences((ITypeResolver)projectContext, assemblyService, ownerNode.DesignerContext.ViewUpdateManager))
                {
                    return;
                }
                ownerNode.SetValueAsSceneNode(VisualStateManagerSceneNode.CustomVisualStateManagerProperty, ownerNode.ViewModel.CreateSceneNode(ProjectNeutralTypes.ExtendedVisualStateManager));
            }
            else
            {
                ownerNode.ClearValue(VisualStateManagerSceneNode.CustomVisualStateManagerProperty);
            }
        }
示例#25
0
 public AttachedPropertiesMetadata(IProjectContext projectContext, IPlatformRuntimeContext runtimeContext, IPlatformReferenceContext referenceContext, IPlatformService platformService, IAssemblyService assemblyService)
 {
     this.projectContext  = projectContext;
     this.platformService = platformService;
     this.platformService.PlatformDisposing += new EventHandler <PlatformEventArgs>(this.AttachedPropertiesMetadata_PlatformDisposing);
     this.assemblyService              = assemblyService;
     this.projectTypesWorker           = new AttachedPropertiesMetadata.AttachedPropertyMetadataBackgroundWorker(this.projectContext, runtimeContext, referenceContext, true);
     this.projectTypesWorker.Complete += new EventHandler(this.OnAttachedPropertiesScanningComplete);
     lock (AttachedPropertiesMetadata.platformTypesWorkerLock)
     {
         if (AttachedPropertiesMetadata.platformWorkerTable.TryGetValue(this.projectContext.Platform, out this.platformTypesWorker))
         {
             return;
         }
         this.platformTypesWorker           = new AttachedPropertiesMetadata.AttachedPropertyMetadataBackgroundWorker(this.projectContext, runtimeContext, referenceContext, false);
         this.platformTypesWorker.Complete += new EventHandler(this.OnAttachedPropertiesScanningComplete);
         AttachedPropertiesMetadata.platformWorkerTable.Add(this.projectContext.Platform, this.platformTypesWorker);
     }
 }
示例#26
0
        /// <summary>
        /// Инициализирует сервисы.
        /// </summary>
        /// <param name="method_service">Сервис для работы и хранения методов.</param>
        /// <param name="assembly_service">Сервис для работы с библиотеками C#.</param>
        /// <param name="coordination_service">Сервис координации.</param>
        /// <param name="data_service">Сервис хранения данных.</param>
        /// <param name="web_server_service"></param>
        public InvokeServiceFactory(IMethodService method_service, IAssemblyService assembly_service, ICoordinationService coordination_service,
                                    IDataService <DataInvoke> data_service, IWebServerService web_server_service, RemoteInvokeService remote_invoke_service)
        {
            _methodService       = method_service;
            _assemblyService     = assembly_service;
            _coordinationService = coordination_service;
            _webServerService    = web_server_service;

            _remoteInvokeService = remote_invoke_service;            // new RemoteInvokeService(_coordinationService, _webServerService);
            var invoke_c_sharp_method  = new InvokeCSharpService(_assemblyService, _methodService, data_service);
            var invoke_executable_file = new InvokeExecutableFileService(new ExecutableFileMethodService(), data_service);

            _serviceDictionary = new Dictionary <Type, IInvokeService>
            {
                /*{typeof(RemoteInvokeService), remote_invoke_service},
                *  {typeof(InvokeCSharpService), invoke_c_sharp_method},*/
                { typeof(CSharpMethod), invoke_c_sharp_method },
                { typeof(ExecutableFileMethod), invoke_executable_file }
            };
        }
示例#27
0
 public void Dispose()
 {
     if (service != null)
     {
         try {
             service.Exit();
         }
         catch (RemotingException) {
             // Couldn't connect
         }
         catch (SerializationException) {
             // For this: "End of Stream encountered before parsing was completed."
         }
         service = null;
     }
     if (loader != null)
     {
         loader.Dispose();
         loader = null;
     }
 }
        private void bindAdditionalPlugins()
        {
            _assemblyService  = _kernel.Get <IAssemblyService>();
            _directoryService = _kernel.Get <IDirectoryService>();
            _pathService      = _kernel.Get <IPathService>();

            var executableLocation    = _assemblyService.GetEntryAssembly().Location;
            var additionalPluginsPath = _pathService.Combine(_pathService.GetDirectoryName(executableLocation), "Plugins");

            if (!_directoryService.Exists(additionalPluginsPath))
            {
                _directoryService.CreateDirectory(additionalPluginsPath);
            }

            _kernel.Bind(x => x
                         .FromAssembliesInPath(additionalPluginsPath)
                         .SelectAllClasses()
                         .InheritedFrom <IPlugin>()
                         .BindDefaultInterfaces()
                         .Configure(y => y.InTransientScope()));
        }
 public GameSettingsViewModelFactory(IAssemblyService ass) {
     _ass = ass;
     _apiModelRegistry = GetApiModelTypeRegistry();
 }
示例#30
0
 public AttachedPropertiesMetadata(IProjectContext projectContext, IPlatformService platformService, IAssemblyService assemblyService)
     : this(projectContext, projectContext.Platform.Metadata.RuntimeContext, projectContext.Platform.Metadata.ReferenceContext, platformService, assemblyService)
 {
 }
		public void LoadServer() {
			if (service != null)
				throw new ApplicationException("Server already loaded");
			service = AssemblyService.Create(serviceType);
		}
 public void loadServer()
 {
     if (service != null)
         throw new ApplicationException("Server already loaded");
     service = new AssemblyService();
 }
示例#33
0
 public AssemblyController(IAssemblyService assemblyService) : base(assemblyService)
 {
     _assemblyService = assemblyService;
 }
示例#34
0
 public ParserService(IAssemblyService assemblyservice, ILoggingService loggingservice)
 {
     _assemblyservice = assemblyservice;
     _loggingservice  = loggingservice;
 }
 public GameFactory(IAssemblyService ass) {
     _ass = ass;
 }
示例#36
0
		public void Connect() {
			loader.LoadServer();
			service = loader.CreateService();
			serverLoadedTime = DateTime.UtcNow;
		}
示例#37
0
		public void Dispose() {
			if (service != null) {
				try {
					service.Exit();
				}
				catch (RemotingException) {
					// Couldn't connect
				}
				catch (SerializationException) {
					// For this: "End of Stream encountered before parsing was completed."
				}
				service = null;
			}
			if (loader != null) {
				loader.Dispose();
				loader = null;
			}
		}