예제 #1
0
        /// <summary>
        /// used for recursive type code creation
        /// </summary>
        private void RegisterCreatedTypeCodeForType(Type forType,
                                                    AttributeExtCollection attributes,
                                                    TypeCodeImpl typeCode)
        {
            TypecodeForTypeKey key = new TypecodeForTypeKey(forType, attributes);

            lock (m_alreadyCreatedTypeCodes)
                m_alreadyCreatedTypeCodes[key] = typeCode;
        }
예제 #2
0
        private TypeCodeImpl CreateOrGetTypeCodeForType(Type forType,
                                                        AttributeExtCollection attributes)
        {
            TypecodeForTypeKey key = new TypecodeForTypeKey(forType, attributes);
            TypeCodeImpl       result;

            lock (m_alreadyCreatedTypeCodes)
                result = m_alreadyCreatedTypeCodes[key] as TypeCodeImpl;

            if (result == null)
            {
                result = Repository.CreateTypeCodeForTypeInternal(forType, attributes, this);
            }

            return(result);
        }
예제 #3
0
 /// <summary>
 /// used for recursive type code creation
 /// </summary>
 private void RegisterCreatedTypeCodeForType(Type forType,
                                             AttributeExtCollection attributes,
                                             TypeCodeImpl typeCode) {
     TypecodeForTypeKey key = new TypecodeForTypeKey(forType, attributes);
     lock(m_alreadyCreatedTypeCodes)
         m_alreadyCreatedTypeCodes[key] = typeCode;
 }
예제 #4
0
        private TypeCodeImpl CreateOrGetTypeCodeForType(Type forType,
                                                        AttributeExtCollection attributes) {
            TypecodeForTypeKey key = new TypecodeForTypeKey(forType, attributes);
            TypeCodeImpl result;

            lock(m_alreadyCreatedTypeCodes)
                result = m_alreadyCreatedTypeCodes[key] as TypeCodeImpl;

            if (result == null)
                result = Repository.CreateTypeCodeForTypeInternal(forType, attributes, this);

            return result;
        }