public JsonBuilderIndicatorStats(IndicatorStatsParameters parameters)
 {
     _parameters = parameters;
     Parameters = _parameters;
 }
        public Dictionary<int, IndicatorStatsResponse> GetIndicatorStatistics(int group_id, int child_area_type_id, string parent_area_code,
            int? profile_id = null, string indicator_ids = null, string restrict_to_profile_ids = null, int data_point_offset = 0)
        {
            try
            {
                NameValueCollection nameValues = new NameValueCollection();
                nameValues.Add(ParameterNames.GroupIds, group_id.ToString());
                nameValues.Add(ParameterNames.ProfileId, profile_id.ToString());
                nameValues.Add(ParameterNames.AreaTypeId, child_area_type_id.ToString());
                nameValues.Add(ParameterNames.ParentAreaCode, parent_area_code);
                nameValues.Add(DataParameters.ParameterIndicatorIds, indicator_ids);
                nameValues.Add(ParameterNames.RestrictToProfileId, restrict_to_profile_ids);
                nameValues.Add(IndicatorStatsParameters.ParameterDataPointOffset, data_point_offset.ToString());

                var parameters = new IndicatorStatsParameters(nameValues);
                return new JsonBuilderIndicatorStats(parameters).GetIndicatorStats();
            }
            catch (Exception ex)
            {
                Log(ex);
                throw;
            }
        }
 public JsonBuilderIndicatorStats(HttpContextBase context)
     : base(context)
 {
     _parameters = new IndicatorStatsParameters(context.Request.Params);
     Parameters = _parameters;
 }