Exemple #1
0
        protected override void WriteImpl(IEnumerable<KeyValuePair<string, int>> fileChurns)
        {
            NChurnAnalysisResult xr = new NChurnAnalysisResult();
            xr.FileChurns = fileChurns.Select(
                x => new FileChurn { File = x.Key, Value = x.Value }).ToList();

            var ds = new DataContractSerializer(typeof(NChurnAnalysisResult));

            var settings = new XmlWriterSettings { Indent = true };

            using (var xw = XmlWriter.Create(_out, settings))
            {
                ds.WriteObject(xw, xr);
            }
        }
Exemple #2
0
        protected override void WriteImpl(IEnumerable <KeyValuePair <string, int> > fileChurns)
        {
            NChurnAnalysisResult xr = new NChurnAnalysisResult();

            xr.FileChurns = fileChurns.Select(
                x => new FileChurn {
                File = x.Key, Value = x.Value
            }).ToList();

            var ds = new DataContractSerializer(typeof(NChurnAnalysisResult));

            var settings = new XmlWriterSettings {
                Indent = true
            };

            using (var xw = XmlWriter.Create(_out, settings))
            {
                ds.WriteObject(xw, xr);
            }
        }