コード例 #1
0
        internal DataSourceStatsDto CreateDto()
        {
            DataSourceStatsDto dto = new DataSourceStatsDto();

            dto.Dao       = this.dao;
            dto.Total     = this.total;
            dto.Discarded = this.discarded;
            return(dto);
        }
コード例 #2
0
 private void WriteStats(DataSourceStatsDto dto)
 {
     this.writer.WriteStartElement("Stats");
     // Total
     this.writer.WriteStartElement("Total");
     this.writer.WriteValue(dto.Total);
     this.writer.WriteEndElement();
     // Discarded
     this.writer.WriteStartElement("Discarded");
     this.writer.WriteValue(dto.Discarded);
     this.writer.WriteEndElement();
     this.writer.WriteEndElement();
 }
コード例 #3
0
        private DataSourceStatsDto ReadDataSourceStats()
        {
            DataSourceStatsDto dto = new DataSourceStatsDto();

            this.reader.Read();

            // Total
            this.reader.ReadStartElement("Total");
            dto.Total = this.reader.ReadContentAsInt();
            this.reader.ReadEndElement();

            // Discarded
            this.reader.ReadStartElement("Discarded");
            dto.Discarded = this.reader.ReadContentAsInt();
            this.reader.ReadEndElement();

            this.reader.ReadEndElement();

            return(dto);
        }
コード例 #4
0
 internal void FixupFromDto(DataSourceStatsDto dto)
 {
     this.dao       = dto.Dao;
     this.total     = dto.Total;
     this.discarded = dto.Discarded;
 }