/// <summary> /// /// </summary> /// <param name="arcDef"></param> public void AddArchive(ArcDef arcDef) { if (arcDefs.Contains(arcDef)) { throw new RrdException("Archive already defined: " + arcDef.Dump()); } arcDefs.Add(arcDef); }
/// <summary> /// /// </summary> /// <returns></returns> public string Dump() { StringBuilder buffer = new StringBuilder(RrdDb.RRDTOOL); buffer.Append(" create " + path); buffer.Append(" --start " + StartTime); buffer.Append(" --step " + Step + " "); for (int i = 0; i < dsDefs.Count; i++) { DsDef dsDef = (DsDef)dsDefs[i]; buffer.Append(dsDef.Dump() + " "); } for (int i = 0; i < arcDefs.Count; i++) { ArcDef arcDef = (ArcDef)arcDefs[i]; buffer.Append(arcDef.Dump() + " "); } return(buffer.ToString().Trim()); }