Beispiel #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);
            }
        }
Beispiel #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);
            }
        }