Exemple #1
0
 public static AttributGroup <T> operator +(AttributGroup <T> ma, T a)
 {
     if (!(ma?.Count > 0))
     {
         return(a == null ? null : new AttributGroup <T> (a));
     }
     if (ma.attributeType == AttributeType.Composite)
     {
         AttributGroup <T> tmp = ma.Clone;
         tmp.Add(a);
         return(tmp);
     }
     else if (a == null)
     {
         return(ma.Clone);
     }
     else
     {
         return(null);
     }
 }
Exemple #2
0
        public static AttributGroup <T> operator |(AttributGroup <T> ma, T a)
        {
//			if (ma == null)
//				return a == null ? null : new MultiformAttribut<T> (a);
            if (ma.attributeType == AttributeType.Choice)
            {
                AttributGroup <T> tmp = ma.Clone;
                tmp.Add(a);
                return(tmp);
            }
            else if (a == null)
            {
                return(ma.Clone);
            }
            else
            {
                return(null);
            }

//				new MultiformAttribut<MultiformAttribut<T>>(AttributeType.Choice,
//				ma.Clone, new MultiformAttribut<T> (a));
        }