Inheritance: TypeRelationship
Ejemplo n.º 1
0
        /// <exception cref="ArgumentNullException">
        ///     <paramref name="first" /> or <paramref name="second" /> is null.
        /// </exception>
        public AssociationRelationship AddAggregation(TypeBase first, TypeBase second)
        {
            AssociationRelationship aggregation = new AssociationRelationship(first, second, AssociationType.Aggregation);

            AddAssociation(aggregation);
            return(aggregation);
        }
Ejemplo n.º 2
0
        /// <exception cref="ArgumentNullException">
        /// <paramref name="first"/> or <paramref name="second"/> is null.
        /// </exception>
        public AssociationRelationship AddAssociation(TypeBase first, TypeBase second)
        {
            AssociationRelationship association = new AssociationRelationship(first, second);

            AddAssociation(association);
            return(association);
        }
Ejemplo n.º 3
0
        public AssociationRelationship Clone(TypeBase first, TypeBase second)
        {
            AssociationRelationship association = new AssociationRelationship(first, second);

            association.CopyFrom(this);
            return(association);
        }
Ejemplo n.º 4
0
        /// <exception cref="ArgumentNullException">
        ///     <paramref name="first" /> or <paramref name="second" /> is null.
        /// </exception>
        public AssociationRelationship AddComposition(TypeBase first, TypeBase second)
        {
            AssociationRelationship composition = new AssociationRelationship(first, second, AssociationType.Composition);

            AddAssociation(composition);
            return(composition);
        }
Ejemplo n.º 5
0
 public bool InsertAssociation(AssociationRelationship associaton)
 {
     if ((associaton != null) && !relationships.Contains(associaton) && entities.Contains(associaton.First) && entities.Contains(associaton.Second))
     {
         AddAssociation(associaton);
         return(true);
     }
     return(false);
 }
Ejemplo n.º 6
0
        protected override void CopyFrom(Relationship relationship)
        {
            base.CopyFrom(relationship);

            AssociationRelationship association = (AssociationRelationship)relationship;

            associationType   = association.associationType;
            direction         = association.direction;
            startRole         = association.startRole;
            endRole           = association.endRole;
            startMultiplicity = association.startMultiplicity;
            endMultiplicity   = association.endMultiplicity;
        }
Ejemplo n.º 7
0
        protected override void CopyFrom(Relationship relationship)
        {
            base.CopyFrom(relationship);

            AssociationRelationship association = (AssociationRelationship)relationship;

            _associationType   = association._associationType;
            _direction         = association._direction;
            _startRole         = association._startRole;
            _endRole           = association._endRole;
            _startMultiplicity = association._startMultiplicity;
            _endMultiplicity   = association._endMultiplicity;
        }
Ejemplo n.º 8
0
 protected virtual void AddAssociation(AssociationRelationship association)
 {
     AddRelationship(association);
 }
Ejemplo n.º 9
0
		/// <exception cref="ArgumentNullException">
		/// <paramref name="association"/> is null.-or-
		/// <paramref name="startShape"/> is null.-or-
		/// <paramref name="endShape"/> is null.
		/// </exception>
		public Association(AssociationRelationship association, Shape startShape, Shape endShape)
			: base(association, startShape, endShape)
		{
			this.association = association;
			association.Reversed += new EventHandler(association_Reversed);
		}
Ejemplo n.º 10
0
		public AssociationRelationship Clone(TypeBase first, TypeBase second)
		{
			AssociationRelationship association = new AssociationRelationship(first, second);
			association.CopyFrom(this);
			return association;
		}