static string LevelToString(CcsEventLevel level) { switch (level) { case CcsEventLevel.Error: return "error: "; case CcsEventLevel.Warning: return "warning: "; default: return ""; } }
void ICcsHost.Event(CcsEventLevel level, IPrimarySourceLocation location, string format, params object[] args) { Contract.Requires(location != null); Contract.Requires(!String.IsNullOrEmpty(format)); Contract.Requires(args != null); throw new NotImplementedException(); }
void ICcsHost.Event(CcsEventLevel level, IPrimarySourceLocation location, string message) { Contract.Requires(location != null); Contract.Requires(!String.IsNullOrEmpty(message)); throw new NotImplementedException(); }
void ICcsHost.Event(CcsEventLevel level, string message) { Contract.Requires(!String.IsNullOrEmpty(message)); throw new NotImplementedException(); }
private void CountErrorsAndWarnings(CcsEventLevel level) { switch (level) { case CcsEventLevel.Error: this.errorCount++; break; case CcsEventLevel.Warning: this.warningCount++; break; } }
public void Event(CcsEventLevel level, string message) { this.CountErrorsAndWarnings(level); [email protected]("CciSharp: {0}{1}", LevelToString(level), message); }
public void Event(CcsEventLevel level, IPrimarySourceLocation location, string format, params object[] args) { //Contract.Requires(location != null); //Contract.Requires(!String.IsNullOrEmpty(format)); this.Event(level, location, String.Format(format, args)); }
public void Event(CcsEventLevel level, IPrimarySourceLocation location, string message) { this.CountErrorsAndWarnings(level); [email protected]("CciSharp: {0}({1}): {2}{3}", location.SourceDocument.Location, location.StartLine, LevelToString(level), message); }
public void Event(CcsEventLevel level, string format, params object[] args) { //Contract.Requires(!String.IsNullOrEmpty(format)); this.Event(level, String.Format(format, args)); }