public JsonBuilderAreaValues(AreaValuesParameters parameters)
 {
     _parameters = parameters;
     Parameters = _parameters;
 }
        public IList<CoreDataSet> GetAreaValues(int group_id, int area_type_id, string parent_area_code,
            int comparator_id, int indicator_id, int sex_id, int age_id,
            int profile_id = ProfileIds.Undefined, int template_profile_id = ProfileIds.Undefined,
            int data_point_offset = 0)
        {
            try
            {
                NameValueCollection nameValues = new NameValueCollection();
                nameValues.Add(ParameterNames.GroupIds, group_id.ToString());
                nameValues.Add(ParameterNames.AreaTypeId, area_type_id.ToString());
                nameValues.Add(ParameterNames.ParentAreaCode, parent_area_code);
                nameValues.Add(ParameterNames.ComparatorId, comparator_id.ToString());
                nameValues.Add(ParameterNames.IndicatorId, indicator_id.ToString());
                nameValues.Add(ParameterNames.SexId, sex_id.ToString());
                nameValues.Add(ParameterNames.AgeId, age_id.ToString());
                nameValues.Add(ParameterNames.ProfileId, profile_id.ToString());
                nameValues.Add(ParameterNames.TemplateProfileId, template_profile_id.ToString());
                nameValues.Add(IndicatorStatsParameters.ParameterDataPointOffset, data_point_offset.ToString());

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