2016-11-04 19:39:57 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
2016-11-10 22:17:57 +00:00
|
|
|
|
using System.Runtime.Serialization;
|
2016-11-04 19:39:57 +00:00
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
|
|
|
|
|
namespace WinUI
|
|
|
|
|
{
|
2016-11-10 22:17:57 +00:00
|
|
|
|
[Serializable]
|
|
|
|
|
public class NetworkRoute : ISerializable
|
2016-11-04 19:39:57 +00:00
|
|
|
|
{
|
2016-11-10 22:17:57 +00:00
|
|
|
|
protected NetworkRoute(SerializationInfo info, StreamingContext ctx)
|
|
|
|
|
{
|
2016-11-10 23:21:54 +00:00
|
|
|
|
Target = info.GetString("target");
|
|
|
|
|
Via = info.GetString("via");
|
|
|
|
|
Flags = info.GetInt32("flags");
|
|
|
|
|
Metric = info.GetInt32("metric");
|
2016-11-10 22:17:57 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public virtual void GetObjectData(SerializationInfo info, StreamingContext ctx)
|
|
|
|
|
{
|
2016-11-10 23:21:54 +00:00
|
|
|
|
info.AddValue("target", Target);
|
|
|
|
|
info.AddValue("via", Via);
|
|
|
|
|
info.AddValue("flags", Flags);
|
|
|
|
|
info.AddValue("metric", Metric);
|
2016-11-10 22:17:57 +00:00
|
|
|
|
}
|
|
|
|
|
|
2016-11-04 19:39:57 +00:00
|
|
|
|
[JsonProperty("target")]
|
|
|
|
|
public string Target { get; set; }
|
|
|
|
|
|
|
|
|
|
[JsonProperty("via")]
|
|
|
|
|
public string Via { get; set; }
|
|
|
|
|
|
|
|
|
|
[JsonProperty("flags")]
|
|
|
|
|
public int Flags { get; set; }
|
|
|
|
|
|
|
|
|
|
[JsonProperty("metric")]
|
|
|
|
|
public int Metric { get; set; }
|
|
|
|
|
}
|
|
|
|
|
}
|