Пример #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UPConfigAnalysisResultColumn"/> class.
 /// </summary>
 /// <param name="definition">
 /// The definition.
 /// </param>
 /// <param name="analysis">
 /// The analysis.
 /// </param>
 public UPConfigAnalysisResultColumn(List <object> definition, UPConfigAnalysis analysis)
 {
     this.FieldTableId    = JObjectExtensions.ToInt(definition[0]);
     this.FieldId         = JObjectExtensions.ToInt(definition[1]);
     this.AggregationType = definition[2] as string;
     this.CategoryName    = definition[3] as string;
     this.ValueName       = definition[4] as string;
 }
Пример #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UPConfigAnalysisValue"/> class.
 /// </summary>
 /// <param name="definition">
 /// The definition.
 /// </param>
 /// <param name="analysis">
 /// The analysis.
 /// </param>
 public UPConfigAnalysisValue(List <object> definition, UPConfigAnalysis analysis)
 {
     this.ValueNumber  = JObjectExtensions.ToInt(definition[0]);
     this.Name         = definition[1] as string;
     this.FixedType    = definition[2] as string;
     this.Label        = definition[3] as string;
     this.Parameter    = definition[4] as string;
     this.OptionString = definition[5] as string;
     this.Options      = this.StringFromOptionString(this.OptionString);
 }
Пример #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="UPConfigAnalysisTable"/> class.
        /// </summary>
        /// <param name="definition">
        /// The definition.
        /// </param>
        /// <param name="analysis">
        /// The analysis.
        /// </param>
        public UPConfigAnalysisTable(List <object> definition, UPConfigAnalysis analysis)
        {
            if (definition == null)
            {
                return;
            }

            this.InfoAreaId  = definition[0] as string;
            this.Occurrence  = JObjectExtensions.ToInt(definition[1]);
            this.TableNumber = JObjectExtensions.ToInt(definition[2]);
            var fieldDefs = (definition[3] as JArray)?.ToObject <List <object> >();

            if (fieldDefs != null && fieldDefs.Count > 0)
            {
                var fields = new List <UPConfigAnalysisField>(fieldDefs.Count);
                foreach (JArray fieldDef in fieldDefs)
                {
                    var field = new UPConfigAnalysisField(fieldDef?.ToObject <List <object> >(), this);
                    fields.Add(field);
                }

                this.Fields = fields;
            }
        }