예제 #1
0
 static string LevelToString(CcsEventLevel level)
 {
     switch (level)
     {
         case CcsEventLevel.Error: return "error: ";
         case CcsEventLevel.Warning:
             return "warning: ";
         default: return "";
     }
 }
예제 #2
0
 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();
 }
예제 #3
0
 void ICcsHost.Event(CcsEventLevel level, IPrimarySourceLocation location, string message)
 {
     Contract.Requires(location != null);
     Contract.Requires(!String.IsNullOrEmpty(message));
     throw new NotImplementedException();
 }
예제 #4
0
 void ICcsHost.Event(CcsEventLevel level, string message)
 {
     Contract.Requires(!String.IsNullOrEmpty(message));
     throw new NotImplementedException();
 }
예제 #5
0
 private void CountErrorsAndWarnings(CcsEventLevel level)
 {
     switch (level)
     {
         case CcsEventLevel.Error: this.errorCount++; break;
         case CcsEventLevel.Warning: this.warningCount++; break;
     }
 }
예제 #6
0
 public void Event(CcsEventLevel level, string message)
 {
     this.CountErrorsAndWarnings(level);
     [email protected]("CciSharp: {0}{1}", LevelToString(level), message);
 }
예제 #7
0
        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));
        }
예제 #8
0
 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);
 }
예제 #9
0
 public void Event(CcsEventLevel level, string format, params object[] args)
 {
     //Contract.Requires(!String.IsNullOrEmpty(format));
     this.Event(level, String.Format(format, args));
 }