Build server prototype (integration with GitHub / NuGet / etc)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
micro-build-server/DotNetBuilder/Response.cs

34 lines
929 B

using Newtonsoft.Json;
using System;
namespace MicroBuildServer.DotNetBuilder
{
8 years ago
[JsonObject(MemberSerialization = MemberSerialization.OptIn)]
[Serializable]
class Response
{
[JsonObject(MemberSerialization = MemberSerialization.OptIn)]
[Serializable]
private class ResponseMessage
{
[JsonProperty(Required = Required.Always)]
public string Type { get; set; }
8 years ago
[JsonProperty(Required = Required.Always)]
public string Body { get; set; }
}
8 years ago
[JsonProperty(Required = Required.Always, PropertyName = "Messages")]
private ResponseMessage[] Messages { get; set; }
8 years ago
public Response(Messages messages)
{
Messages = messages.ToArray(message => new ResponseMessage
{
Type = message.Type,
Body = message.Body,
});
}
}
}