Exemplo n.º 1
0
        public RelationEndPointDefinitionCollection CreateRelationEndPointDefinitionCollection(ClassDefinition classDefinition)
        {
            ArgumentUtility.CheckNotNull("classDefinition", classDefinition);

            var endPoints = new RelationEndPointDefinitionCollection();

            foreach (var propertyInfo in GetRelationPropertyInfos(classDefinition))
            {
                var relationEndPoint = _mappingObjectFactory.CreateRelationEndPointDefinition(classDefinition, propertyInfo);
                endPoints.Add(relationEndPoint);
            }
            return(endPoints);
        }
Exemplo n.º 2
0
        public RelationEndPointDefinitionCollection CreateRelationEndPointDefinitionCollection(ClassDefinition classDefinition)
        {
            ArgumentUtility.CheckNotNull("classDefinition", classDefinition);

            var factory = new RelationEndPointDefinitionCollectionFactory(this, _nameResolver, _propertyMetadataProvider);

            return(factory.CreateRelationEndPointDefinitionCollection(classDefinition));
        }
        public static RelationEndPointDefinitionCollection CreateForAllRelationEndPoints(ClassDefinition classDefinition, bool makeCollectionReadOnly)
        {
            ArgumentUtility.CheckNotNull("classDefinition", classDefinition);

            return
                (new RelationEndPointDefinitionCollection(
                     classDefinition.CreateSequence(cd => cd.BaseClass).SelectMany(cd => cd.MyRelationEndPointDefinitions), makeCollectionReadOnly));
        }
Exemplo n.º 4
0
 public static PropertyDefinitionCollection CreateForAllProperties(ClassDefinition classDefinition, bool makeCollectionReadOnly)
 {
     ArgumentUtility.CheckNotNull("classDefinition", classDefinition);
     return(new PropertyDefinitionCollection(
                classDefinition.CreateSequence(cd => cd.BaseClass).SelectMany(cd => cd.MyPropertyDefinitions), makeCollectionReadOnly));
 }