コード例 #1
0
ファイル: Realization.cs プロジェクト: arihunta/nclass-mod
        protected override bool CloneRelationship(Diagram diagram, Shape first, Shape second)
        {
            TypeBase      firstType  = first.Entity as TypeBase;
            InterfaceType secondType = second.Entity as InterfaceType;

            if (firstType != null && secondType != null)
            {
                RealizationRelationship clone = realization.Clone(firstType, secondType);
                return(diagram.InsertRealization(clone));
            }
            else
            {
                return(false);
            }
        }
コード例 #2
0
ファイル: Realization.cs プロジェクト: gbaychev/NClass
		/// <exception cref="ArgumentNullException">
		/// <paramref name="realization"/> is null.-or-
		/// <paramref name="startShape"/> is null.-or-
		/// <paramref name="endShape"/> is null.
		/// </exception>
		public Realization(RealizationRelationship realization, Shape startShape, Shape endShape)
			: base(realization, startShape, endShape)
		{
			this.realization = realization;
		}
コード例 #3
0
 public bool InsertRealization(RealizationRelationship realization)
 {
     return(model.InsertRelationship(realization));
 }
コード例 #4
0
ファイル: Realization.cs プロジェクト: arihunta/nclass-mod
 /// <exception cref="ArgumentNullException">
 /// <paramref name="realization"/> is null.-or-
 /// <paramref name="startShape"/> is null.-or-
 /// <paramref name="endShape"/> is null.
 /// </exception>
 public Realization(RealizationRelationship realization, Shape startShape, Shape endShape)
     : base(realization, startShape, endShape)
 {
     this.realization = realization;
 }
コード例 #5
0
ファイル: ClassModel.cs プロジェクト: gbaychev/NClass
        /// <exception cref="RelationshipException">
        /// Cannot create relationship between the two types.
        /// </exception>
        /// <exception cref="ArgumentNullException">
        /// <paramref name="implementer"/> or <paramref name="baseType"/> is null.
        /// </exception>
        public RealizationRelationship AddRealization(TypeBase implementer,
            InterfaceType baseType)
        {
            RealizationRelationship realization = new RealizationRelationship(
                implementer, baseType);

            AddRelationship(realization);
            return realization;
        }