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.
43 lines
1.1 KiB
43 lines
1.1 KiB
|
10 years ago
|
using System;
|
||
|
|
using System.Collections.Generic;
|
||
|
|
using System.Linq;
|
||
|
10 years ago
|
using System.Runtime.Serialization;
|
||
|
10 years ago
|
using System.Text;
|
||
|
|
using System.Threading.Tasks;
|
||
|
|
using Newtonsoft.Json;
|
||
|
|
|
||
|
|
namespace WinUI
|
||
|
|
{
|
||
|
10 years ago
|
[Serializable]
|
||
|
|
public class NetworkRoute : ISerializable
|
||
|
10 years ago
|
{
|
||
|
10 years ago
|
protected NetworkRoute(SerializationInfo info, StreamingContext ctx)
|
||
|
|
{
|
||
|
10 years ago
|
Target = info.GetString("target");
|
||
|
|
Via = info.GetString("via");
|
||
|
|
Flags = info.GetInt32("flags");
|
||
|
|
Metric = info.GetInt32("metric");
|
||
|
10 years ago
|
}
|
||
|
|
|
||
|
|
public virtual void GetObjectData(SerializationInfo info, StreamingContext ctx)
|
||
|
|
{
|
||
|
10 years ago
|
info.AddValue("target", Target);
|
||
|
|
info.AddValue("via", Via);
|
||
|
|
info.AddValue("flags", Flags);
|
||
|
|
info.AddValue("metric", Metric);
|
||
|
10 years ago
|
}
|
||
|
|
|
||
|
10 years ago
|
[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; }
|
||
|
|
}
|
||
|
|
}
|