Пример #1
0
        public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
        {
            JArray ja    = JArray.Load(reader);
            double angle = ja[1].Value <double>();
            Spin   spin  = Spin.Create(angle);

            return(spin);
        }
Пример #2
0
 private void SpinTimer_Tick(object sender, EventArgs e)
 {
     Send(JsonConvert.SerializeObject(Spin.Create(spinAngle)));
     spinTimer.Enabled = true;
 }