コード例 #1
0
 public static void SerializePostprocessorOutput(
     IEnumerable <TSBlocks.TimeSeriesData> series, IEnumerable <TSBlocks.EventBase> events, string outputFileName,
     TSBlocks.ITimeSeriesTypesAccess timeSeriesTypesAccess)
 {
     using (var writer = XmlWriter.Create(outputFileName))
     {
         writer.WriteStartElement("Data");
         timeSeriesTypesAccess.GetEventsSerializer().Serialize(writer, events.ToList());
         timeSeriesTypesAccess.GetSeriesSerializer().Serialize(writer, series.ToList());
         writer.WriteEndElement();
     }
 }
コード例 #2
0
 public TimeSeriesPostprocessorOutput(XDocument doc, ILogSource logSource,
                                      ILogPartTokenFactory rotatedLogPartFactory, TSBlocks.ITimeSeriesTypesAccess timeSeriesTypesAccess)
 {
     this.logSource = logSource;
     logDisplayName = logSource.DisplayName;
     using (var reader = doc.CreateReader())
     {
         reader.ReadStartElement();
         events     = (List <TSBlocks.EventBase>)timeSeriesTypesAccess.GetEventsSerializer().Deserialize(reader);
         timeSeries = (List <TSBlocks.TimeSeriesData>)timeSeriesTypesAccess.GetSeriesSerializer().Deserialize(reader);
     }
 }