Beispiel #1
0
        public void SetFromTypeName(string typeName)
        {
            AggregationTypeDetail atd = AggregationTypeDetail.GetByTypeName(typeName);

            SetFromDetail(atd);
            return;
        }
Beispiel #2
0
        /// <summary>
        /// Construct from type name
        /// </summary>
        /// <param name="typeName"></param>

        public AggregationDef(string typeName)
        {
            AggregationTypeDetail atd = AggregationTypeDetail.GetByTypeName(typeName);

            if (atd == null)
            {
                throw new Exception("Aggregation type not found: " + typeName);
            }

            SetFromDetail(atd);
            return;
        }
Beispiel #3
0
        /// <summary>
        /// Set Aggregation by AggregationTypeDetail name
        /// </summary>

        public AggregationTypeDetail SetAggregation(string typeName)
        {
            if (Lex.IsUndefined(typeName) || Lex.Eq(typeName, "none"))             // clear?
            {
                Aggregation = null;
                return(null);
            }

            AggregationTypeDetail atd = AggregationTypeDetail.GetByTypeName(typeName);

            if (Aggregation != null && Lex.Eq(atd.TypeName, Aggregation.TypeName))
            {
                return(atd);                                                                               // same as before
            }
            Aggregation = new AggregationDef(typeName);

            return(atd);
        }