Пример #1
0
        private void CombineScales(HttpContext context)
        {
            string xPath = context.Request.Params["XPath"];

            string name = context.Request.Params["Name"];

            // Get the source string from the http request's parameters.
            string source  = context.Request.Params["Source"];
            string source2 = context.Request.Params["Source2"];

            string path  = context.Request.Params["Path"];
            string path2 = context.Request.Params["Path2"];

            // Set the default for the language to english GB.
            int idLanguage = 2057;

            // Check if a specific language is defined.
            if (context.Request.Params["IdLanguage"] != null)
            {
                idLanguage = int.Parse(context.Request.Params["IdLanguage"]);
            }

            DefinitionObject score  = new DefinitionObject(Global.Core, source, path);
            DefinitionObject score2 = new DefinitionObject(Global.Core, source2, path2);

            if (string.IsNullOrEmpty(path2))
            {
                score2 = null;
            }

            string resultPath = score.Combine(score2);

            //context.Response.Write(idScoreGroup.ToString());

            string result = RenderScoreToJson(new DefinitionObject(
                                                  Global.Core,
                                                  source,
                                                  path
                                                  ), idLanguage);

            context.Response.Write(result);
        }