public void DumpToFile(String filename, IClusterFormat format = null, Encoding encoding = null) { if (encoding == null) { encoding = Encoding.ASCII; } format = format == null ? Formats[Path.GetExtension(filename)] : format; StreamWriter sw = new StreamWriter(filename, true, encoding); sw.Write(ToString(format)); sw.Close(); sw.Dispose(); }
public String ToString(IClusterFormat format) { return(format.GetStringRepresentation(this)); }