dependabot/npm_and_yarn/BuildServer/eslint-7.2.0
Inga 🏳‍🌈 9 years ago
parent 858a0745c7
commit c8ea3e6c31
  1. 5
      BuildServer/lib/tasks/dotnetbuilderwrapper.js
  2. 2
      DotNetBuilder/Program.cs
  3. 6
      DotNetBuilder/Response.cs

@ -28,6 +28,11 @@ module.exports = function (params, processor) {
var report = JSON.parse(result);
var messages = report.Messages;
for (var i = 0; i < messages.length; i++) {
if (!messages[i]) {
processor.onError("Message is null");
continue;
}
switch(messages[i].Type) {
case "info":
processor.onInfo(messages[i].Body);

@ -30,7 +30,7 @@ namespace MicroBuildServer.DotNetBuilder
}
catch (Exception e)
{
return new Response { Messages = new[] { new Response.Message { Type = "error", Body = e.ToString() } } };
return new Response { Messages = new[] { Response.Message.CreateError(e.ToString()) } };
}
}

@ -11,12 +11,12 @@ namespace MicroBuildServer.DotNetBuilder
[Serializable]
public class Message
{
public string Type { get; set; }
public string Body { get; set; }
public string Type { get; private set; }
public string Body { get; private set; }
public static Message CreateInfo(string body)
{
return new Message {Type = "info", Body = body};
return new Message { Type = "info", Body = body };
}
public static Message CreateWarn(string body)

Loading…
Cancel
Save