private void HandleAssociationSetElement(XmlReader reader)
        {
            Debug.Assert(reader != null);
            EntityContainerAssociationSet set = new EntityContainerAssociationSet(this);

            set.Parse(reader);
            Members.Add(set, true, Strings.DuplicateEntityContainerMemberName);
        }
        internal override SchemaElement Clone(SchemaElement parentElement)
        {
            EntityContainerAssociationSet associationSet = new EntityContainerAssociationSet((EntityContainer)parentElement);

            associationSet.Name         = this.Name;
            associationSet.Relationship = this.Relationship;

            foreach (EntityContainerAssociationSetEnd end in this.Ends)
            {
                EntityContainerAssociationSetEnd clonedEnd = (EntityContainerAssociationSetEnd)end.Clone(associationSet);
                associationSet._relationshipEnds.Add(clonedEnd.Role, clonedEnd);
            }

            return(associationSet);
        }
 private void HandleAssociationSetElement(XmlReader reader)
 {
     Debug.Assert(reader != null);
     EntityContainerAssociationSet set = new EntityContainerAssociationSet(this);
     set.Parse(reader);
     Members.Add(set, true, Strings.DuplicateEntityContainerMemberName);
 }
Exemplo n.º 4
0
 /// <summary>
 /// Constructs an EntityContainerAssociationSetEnd
 /// </summary>
 /// <param name="parentElement">Reference to the schema element.</param>
 public EntityContainerAssociationSetEnd(EntityContainerAssociationSet parentElement)
     : base(parentElement)
 {
 }
        internal override SchemaElement Clone(SchemaElement parentElement)
        {
            var associationSet = new EntityContainerAssociationSet((EntityContainer)parentElement);

            associationSet.Name = Name;
            associationSet.Relationship = Relationship;

            foreach (EntityContainerAssociationSetEnd end in Ends)
            {
                var clonedEnd = (EntityContainerAssociationSetEnd)end.Clone(associationSet);
                associationSet._relationshipEnds.Add(clonedEnd.Role, clonedEnd);
            }

            return associationSet;
        }
 /// <summary>
 /// Constructs an EntityContainerAssociationSetEnd
 /// </summary>
 /// <param name="parentElement">Reference to the schema element.</param>
 public EntityContainerAssociationSetEnd( EntityContainerAssociationSet parentElement )
     : base( parentElement )
 {
 }