using System;
using Newtonsoft.Json;
using NinjaTrader.NinjaScript;

namespace Replikanto.converter
{
	public class AtmStrategyConverter : JsonConverter<AtmStrategy>
	{
		public override AtmStrategy ReadJson(JsonReader reader, Type objectType, AtmStrategy existingValue, bool hasExistingValue, JsonSerializer serializer)
		{
			try
			{
				StrategyBase strategyBase = Delegate589.smethod_0((long)reader.Value, Delegate589.delegate589_0);
				if (strategyBase is AtmStrategy)
				{
					return strategyBase as AtmStrategy;
				}
			}
			catch
			{
			}
			return null;
		}

		public override void WriteJson(JsonWriter writer, AtmStrategy value, JsonSerializer serializer)
		{
			writer.WriteValue(Delegate134.smethod_0(value, Delegate134.GlcscZpym0));
		}

		internal static void smethod_0(object object_0, long long_0)
		{
			object_0.WriteValue(long_0);
		}

		internal static void smethod_1()
		{
		}

		internal static void smethod_2()
		{
		}
	}
}
