/// <summary>
        /// Returns a list of the services supported by this plugin.
        /// </summary>
        /// <returns></returns>
        public override IList<SupportedSop> GetSupportedSopClasses()
        {
            // Note: this method is called on startup to set the server's presentation contexts and then on every association.
            // If the settings change between those calls, the server may either throw an exception (if the sop is removed) or 
            // does not behave as expected unless the server is restarted.

            if (_list == null)
            {
                _list = new List<SupportedSop>();

                // Get the SOP Classes
                var partitionSopClassConfig = new PartitionSopClassConfiguration();
                var sopClasses = partitionSopClassConfig.GetAllPartitionSopClasses(Partition);

                // Now process the SOP Class List
                foreach (PartitionSopClass partitionSopClass in sopClasses)
                {
                    if (partitionSopClass.Enabled
                        && !partitionSopClass.NonImage)
                    {
                        SupportedSop sop = new SupportedSop();

                        sop.SopClass = SopClass.GetSopClass(partitionSopClass.SopClassUid);
                        if (!partitionSopClass.ImplicitOnly)
                            sop.SyntaxList.Add(TransferSyntax.ExplicitVrLittleEndian);
             
                        sop.SyntaxList.Add(TransferSyntax.ImplicitVrLittleEndian);

                        _list.Add(sop);
                    }
                }
            }
            return _list;
        }
        /// <summary>
        /// Returns a list of the services supported by this plugin.
        /// </summary>
        /// <returns></returns>
        public override IList<SupportedSop> GetSupportedSopClasses()
        {
            if (!Context.AllowStorage)
                return new List<SupportedSop>();

            if (_sopList == null)
            {
                _sopList = new List<SupportedSop>();

                // Get the SOP Classes
                using (IReadContext read = _store.OpenReadContext())
                {
                    // Get the transfer syntaxes
                    _syntaxList = LoadTransferSyntaxes(read, Partition.GetKey(),true);
                }

                var partitionSopClassConfig = new PartitionSopClassConfiguration();
                var sopClasses = partitionSopClassConfig.GetAllPartitionSopClasses(Partition);
                if (sopClasses != null)
                {
                    // Now process the SOP Class List
                    foreach (PartitionSopClass partitionSopClass in sopClasses)
                    {
                        if (partitionSopClass.Enabled
                            && !partitionSopClass.NonImage)
                        {
                            var sop = new SupportedSop
                                {
                                    SopClass = SopClass.GetSopClass(partitionSopClass.SopClassUid)
                                };

                            foreach (PartitionTransferSyntax syntax in _syntaxList)
                            {
                                sop.SyntaxList.Add(TransferSyntax.GetTransferSyntax(syntax.Uid));
                            }
                            _sopList.Add(sop);
                        }
                    }
                }

            }
            return _sopList;
        }