示例#1
0
        public TypeRelationshipInfo SetOrCreateRelationshipInfo(TypeDescriptor relatedTypeDescriptor, EntityRelationshipType entityRelationshipType, PropertyDescriptor relatedProperty)
        {
            TypeRelationshipInfo retval;

            if (this.relationshipInfos.TryGetValue(relatedTypeDescriptor, out retval))
            {
                retval.EntityRelationshipType    = entityRelationshipType;
                retval.ReferencingProperty       = relatedProperty;
                retval.RelatedTypeTypeDescriptor = relatedTypeDescriptor;

                return(retval);
            }

            retval = new TypeRelationshipInfo(relatedTypeDescriptor, entityRelationshipType, relatedProperty);

            this.relationshipInfos[relatedTypeDescriptor] = retval;

            return(retval);
        }
示例#2
0
        public TypeRelationshipInfo SetOrCreateRelationshipInfo(TypeDescriptor relatedTypeDescriptor, EntityRelationshipType entityRelationshipType, PropertyDescriptor relatedProperty)
        {
            TypeRelationshipInfo retval;

            if (this.relationshipInfos.TryGetValue(relatedTypeDescriptor, out retval))
            {
                retval.EntityRelationshipType = entityRelationshipType;
                retval.ReferencingProperty = relatedProperty;
                retval.RelatedTypeTypeDescriptor = relatedTypeDescriptor;

                return retval;
            }

            retval = new TypeRelationshipInfo(relatedTypeDescriptor, entityRelationshipType, relatedProperty);

            this.relationshipInfos[relatedTypeDescriptor] = retval;

            return retval;
        }