Пример #1
0
        public bool IsTransferSyntaxSupported(string abstractSyntax, string transferSyntax)
        {
            if (_configurationManager == null)
            {
                DicomServer server = ServiceLocator.Retrieve <DicomServer>();

                try
                {
                    _configurationManager = new StorageModuleConfigurationManager(true);
                    _configurationManager.Load(server.ServerDirectory);
                }
                catch (Exception e)
                {
                    StoreCommandInitializationService.LogEvent(e.Message, null);
                }
            }
            if (_configurationManager == null)
            {
                return(false);
            }

            try
            {
                return(_configurationManager.GetPresentationContexts().IsTransferSyntaxSupported(abstractSyntax, transferSyntax));
            }
            catch (Exception e)
            {
                StoreCommandInitializationService.LogEvent(e.Message + "\r\n" + e.StackTrace, null);
                return(false);
            }
        }
Пример #2
0
        public void LoadSession(string serviceDirectory, string displayName, bool fromServer)
        {
            if (ServiceLocator.IsRegistered <ILicense>())
            {
                _License = ServiceLocator.Retrieve <ILicense>();
            }

            if (ServiceLocator.IsRegistered <DicomServer> ( ))
            {
                _server = ServiceLocator.Retrieve <DicomServer> ( );
            }

            ServiceDirectory = serviceDirectory;
            DisplayName      = displayName;

            RegisterDataAccessAgents(displayName);

            if (null != _server)
            {
                ServerAE      = _server.AETitle;
                ServerAddress = _server.HostAddress;
                ServerPort    = _server.Port;
            }

            _configurationManager = new StorageModuleConfigurationManager(fromServer);

            _configurationManager.Load(serviceDirectory);

            StorageAddInsConfiguration storageConfiguration = _configurationManager.GetStorageAddInsSettings( );

            _configurationManager.GetPresentationContexts( );//Laod this in the load so it won't delay the process later

            UpdateDataAccessLayerSettings(storageConfiguration);

            bool ret = CheckPermissions(storageConfiguration);


            if (ret == false)
            {
                // Sleep so that the service is in the PendingStart state for a while
                // Otherwise, it sometimes skips the PendingStart state altogether
                Thread.Sleep(1000);
                throw new ServiceStartException("Cannot start the Storage Server Service: One or more folders do not exist.");
            }
        }
Пример #3
0
 public FindCommandInitializationService(StorageModuleConfigurationManager configManager)
 {
     _configManager = configManager;
 }