private AnalysisExecutionSettings SettingsWithAdditionalConditionCategory(AnalysisFilter filter, AnalysisCategory category) { List <object> conditions; if (filter != null) { List <object> cond = new List <object>(); if (this.Conditions?.Count > 0) { cond.AddRange(this.Conditions); } cond.Add(filter); conditions = cond; } else { conditions = this.Conditions; } if (category == null) { category = this.Category; } return(new AnalysisExecutionSettings(this.Analysis, category, this.XCategory, this.ResultColumns, conditions, true, this.CurrencyCode)); }
/// <summary> /// LogSettings with category /// </summary> /// <param name="category">Category</param> /// <returns>Analysis execution settings</returns> public AnalysisExecutionSettings SettingsWithCategory(AnalysisCategory category) { return(new AnalysisExecutionSettings(this.Analysis, category, this.XCategory, this.ResultColumns, this.Conditions, this.ShowEmpty, this.CurrencyCode)); }
/// <summary> /// Value for category /// </summary> /// <param name="category">Category</param> /// <returns>Value</returns> public string ValueForCategory(AnalysisCategory category) { return((this.ConditionChecker.ConditionOperator == ConditionCheckOperator.Equal && this.Key == category.Key) ? this.ConditionChecker.Value : null); }
/// <summary> /// Initializes a new instance of the <see cref="AnalysisExecutionSettings"/> class. /// </summary> /// <param name="analysis">Analysis</param> /// <param name="category">Category</param> /// <param name="xCategory">X Category</param> /// <param name="resultColumns">Result columns</param> /// <param name="conditions">Conditions</param> /// <param name="showEmpty">Show empty</param> /// <param name="currencyCode">Currency code</param> public AnalysisExecutionSettings(Analysis analysis, AnalysisCategory category, AnalysisCategory xCategory, List <AnalysisResultColumn> resultColumns, List <object> conditions, bool showEmpty, int currencyCode) { this.Category = category; this.XCategory = xCategory; this.ResultColumns = resultColumns; this.Conditions = conditions; this.Analysis = analysis; this.ShowEmpty = showEmpty; this.CurrencyCode = currencyCode; }
/// <summary> /// Initializes a new instance of the <see cref="AnalysisCategoryFilter"/> class. /// </summary> /// <param name="category">Category</param> /// <param name="val">Value</param> public AnalysisCategoryFilter(AnalysisCategory category, string val) : base(val, val) { this.Category = category; }