Пример #1
0
        /// <summary>
        /// Verify a presentation context.
        /// </summary>
        /// <param name="association"></param>
        /// <param name="pcid"></param>
        /// <returns></returns>
        public DicomPresContextResult VerifyAssociation(AssociationParameters association, byte pcid)
        {
            bool isNew;

            Device = DeviceManager.LookupDevice(Partition, association, out isNew);

            // Let the subclass perform the verification
            DicomPresContextResult result = OnVerifyAssociation(association, pcid);

            if (result != DicomPresContextResult.Accept)
            {
                Platform.Log(LogLevel.Debug, "Rejecting Presentation Context {0}:{1} in association between {2} and {3}.",
                             pcid, association.GetAbstractSyntax(pcid).Description,
                             association.CallingAE, association.CalledAE);
            }

            return(result);
        }
Пример #2
0
        public DicomPresContextResult VerifyAssociation(AssociationParameters association, byte pcid)
        {
            bool isNew;

            var dm = IoC.Get <IDeviceManager>();

            Device = dm.LookupDevice(_context.Partition, association, out isNew);

            var result = OnVerifyAssociation(association, pcid);

            if (result != DicomPresContextResult.Accept)
            {
                Log.Logger.Info(
                    "Rejecting Presentation Context {0}:{1} in association between {2} and {3}.",
                    pcid, association.GetAbstractSyntax(pcid).Description,
                    association.CallingAE, association.CalledAE);
            }

            return(result);
        }