Ejemplo n.º 1
0
        /// <summary>
        /// Return an instance of the DSStringValidator object
        /// Note: the returned object may be shared among threads or objects.
        /// </summary>
        /// <param name="attribute"></param>
        /// <returns></returns>
        /// <remarks>
        ///
        ///</remarks>
        public static DSStringValidator GetInstance(DicomAttribute attribute)
        {
            lock (_mutex)
            {
                int key = GetKey(attribute);

                DSStringValidator validator = _map[key] as DSStringValidator;
                if (validator == null)
                {
                    validator = new DSStringValidator();
                    _map[key] = validator;
                }
                return(validator);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Return an instance of the DSStringValidator object
        /// Note: the returned object may be shared among threads or objects.
        /// </summary>
        /// <param name="attribute"></param>
        /// <returns></returns>
        /// <remarks>
        /// 
        ///</remarks>
        public static DSStringValidator GetInstance(DicomAttribute attribute)
        {
            lock (_mutex)
            {
                int key = GetKey(attribute);

                DSStringValidator validator = _map[key] as DSStringValidator;
                if (validator == null)
                {
                    validator = new DSStringValidator();
                    _map[key] = validator;
                }
                return validator;
            }
            
        }