mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-10 15:20:48 -05:00
updates to support new master versioning
make sure game files are copied correctly in build output
This commit is contained in:
26
SharedLibraryCore/Helpers/BuildNumberJsonConverter.cs
Normal file
26
SharedLibraryCore/Helpers/BuildNumberJsonConverter.cs
Normal file
@ -0,0 +1,26 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
|
||||
namespace SharedLibraryCore.Helpers
|
||||
{
|
||||
/// <summary>
|
||||
/// JSON converter for the build number
|
||||
/// </summary>
|
||||
public class BuildNumberJsonConverter : JsonConverter
|
||||
{
|
||||
public override bool CanConvert(Type objectType)
|
||||
{
|
||||
return objectType == typeof(string);
|
||||
}
|
||||
|
||||
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
|
||||
{
|
||||
return BuildNumber.Parse(reader.Value.ToString());
|
||||
}
|
||||
|
||||
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
|
||||
{
|
||||
writer.WriteValue(value.ToString());
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user