コード例 #1
0
ファイル: QQueryBase.cs プロジェクト: git-thinh/limada
        private Collection4 IntroduceClassConstrain(IReflectClass claxx)
        {
            Collection4 newConstraints      = new Collection4();
            IEnumerator existingConstraints = IterateConstraints();

            while (existingConstraints.MoveNext())
            {
                QCon         existingConstraint = (QConObject)existingConstraints.Current;
                BooleanByRef removeExisting     = new BooleanByRef(false);
                QCon         newConstraint      = existingConstraint.ShareParentForClass(claxx, removeExisting
                                                                                         );
                if (newConstraint != null)
                {
                    newConstraints.Add(newConstraint);
                    AddConstraint(newConstraint);
                    if (removeExisting.value)
                    {
                        RemoveConstraint(existingConstraint);
                    }
                }
            }
            return(newConstraints);
        }