Пример #1
0
        void FormatForOutput(string input, int update, IDSFDataObject dataObj, bool formatResult, IOutputFormatter formater)
        {
            var formattedInput = input;

            if (formater != null && formatResult)
            {
                formattedInput = formater.Format(input).ToString();
            }

            var xDoc = new XmlDocument();

            formattedInput = string.Format("<Tmp{0}>{1}</Tmp{0}>", Guid.NewGuid().ToString("N"), formattedInput);
            xDoc.LoadXml(formattedInput);

            if (xDoc.DocumentElement != null)
            {
                var children = xDoc.DocumentElement.ChildNodes;
                IDictionary <string, int> indexCache = new Dictionary <string, int>();
                var outputDefs =
                    Outputs.Select(
                        a =>
                        new Dev2Definition(DataListUtil.GetVariableNameToMapOutputTo(a.MappedTo), a.MappedTo, "", a.RecordSetName, true, "", true,
                                           a.MappedTo) as IDev2Definition).ToList();
                TryConvert(children, outputDefs, indexCache, update, dataObj);
            }
        }