/// <summary>
        /// Load a list of preferred SOP Classes and Transfer Syntaxes for a Device.
        /// </summary>
        /// <param name="read">A read context to read from the database.</param>
        public void LoadPreferredSyntaxes(IPersistenceContext read)
        {
            var select = read.GetBroker<IDevicePreferredTransferSyntaxEntityBroker>();

            // Setup the select parameters.
            var criteria = new DevicePreferredTransferSyntaxSelectCriteria();
            criteria.DeviceKey.EqualTo(_remoteDevice.GetKey());

            IList<DevicePreferredTransferSyntax> list = select.Find(criteria);

            // Translate the list returned into the database into a list that is supported by the Storage SCU Component
            var sopList = new List<SupportedSop>();
            foreach (DevicePreferredTransferSyntax preferred in list)
            {
                var sop = new SupportedSop
                              {
                                  SopClass = SopClass.GetSopClass(preferred.GetServerSopClass().SopClassUid)
                              };
            	sop.AddSyntax(TransferSyntax.GetTransferSyntax(preferred.GetServerTransferSyntax().Uid));

                sopList.Add(sop);
            }

            SetPreferredSyntaxList(sopList);
        }
Exemple #2
0
 public DevicePreferredTransferSyntaxSelectCriteria(DevicePreferredTransferSyntaxSelectCriteria other)
     : base(other)
 {
 }
 public DevicePreferredTransferSyntaxSelectCriteria(DevicePreferredTransferSyntaxSelectCriteria other)
 : base(other)
 {}