Exemplo n.º 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);
            }
        }
Exemplo n.º 2
0
        public RoleSelectionFlags GetRoleSelection(string abstractSyntax)
        {
            // Call IsAbstractSyntaxSupported to load the _configurationManager
            if (!IsAbstractSyntaxSupported(abstractSyntax))
            {
                return(RoleSelectionFlags.None);
            }

            if (_configurationManager == null)
            {
                return(RoleSelectionFlags.None);
            }

            try
            {
                return(_configurationManager.GetPresentationContexts().GetRoleSelection(abstractSyntax));
            }
            catch (Exception e)
            {
                StoreCommandInitializationService.LogEvent(e.Message + "\r\n" + e.StackTrace, null);
                return(RoleSelectionFlags.None);
            }
        }