internal static string Format(ParameterLog log) { ReadBlobParameterLog readBlobLog = log as ReadBlobParameterLog; if (readBlobLog != null) { return(Format(readBlobLog)); } WriteBlobParameterLog writeBlobLog = log as WriteBlobParameterLog; if (writeBlobLog != null) { return(Format(writeBlobLog)); } TableParameterLog tableLog = log as TableParameterLog; if (tableLog != null) { return(Format(tableLog)); } TextParameterLog textLog = log as TextParameterLog; if (textLog != null) { return(textLog.Value); } return(null); }
public void Format_WriteBlobParameterLog(bool wasWritten, long bytesWritten, string expected) { ParameterLog log = new WriteBlobParameterLog() { WasWritten = wasWritten, BytesWritten = bytesWritten }; string result = LogAnalysis.Format(log); Assert.Equal(expected, result); }
private static string Format(WriteBlobParameterLog log) { Debug.Assert(log != null); if (!log.WasWritten) { return("Nothing was written."); } else { return(String.Format(CultureInfo.CurrentCulture, "Wrote {0:n0} bytes.", log.BytesWritten)); } }
private static string Format(WriteBlobParameterLog log) { Debug.Assert(log != null); if (!log.WasWritten) { return "Nothing was written."; } else { return String.Format(CultureInfo.CurrentCulture, "Wrote {0:n0} bytes.", log.BytesWritten); } }