private void FixupFromDto(ArchiveTemplateDto dto) { this.dao = dto.Dao; this.name = dto.Name; this.maxDataPoints = dto.MaxDataPoints; this.numReadingsPerDataPoint = dto.ReadingsPerDataPoint; this.consolidationFunction = (ConsolidationFunctionType)dto.ConsolidationFunction; this.xFactor = dto.XFactor; }
/// <summary> /// Create the archive in the database /// </summary> public void Create(TimeSeriesDatabase database) { Debug.Assert(this.dao == null); Debug.Assert(database != null); this.database = database; this.dao = this.database.GetDaoFactory().CreateArchiveTemplate(this.database.Dao); this.dao.Create(CreateDto()); }