ln.skyscanner/entities/PointOfPresence.cs

53 lines
1.3 KiB
C#
Raw Normal View History

2019-04-08 08:47:12 +02:00
// /**
// * File: PointOfPresence.cs
// * Author: haraldwolff
// *
// * This file and it's content is copyrighted by the Author and / or copyright holder.
// * Any use wihtout proper permission is illegal and may lead to legal actions.
// *
// *
// **/
using System;
using ln.types.odb;
using System.Collections.Generic;
using System.Linq;
using ln.types;
using ln.types.odb.attributes;
using Newtonsoft.Json;
2019-04-11 08:30:13 +02:00
using ln.types.odb.collections;
2019-04-08 08:47:12 +02:00
namespace ln.skyscanner.entities
{
public class PointOfPresence
{
[DocumentID]
public Guid ID = Guid.NewGuid();
public String Name { get; set; }
public String ForeignName { get; set; }
2019-04-11 08:30:13 +02:00
public RefList<Node> Nodes { get; private set; } = new RefList<Node>();
2019-04-08 08:47:12 +02:00
2019-04-11 08:30:13 +02:00
public GeoLocation GeoLocation { get; set; }
2019-04-08 08:47:12 +02:00
public DateTime Created { get; private set; } = DateTime.Now;
2019-06-28 10:01:30 +02:00
[JsonIgnore]
public IEnumerable<L2Segment> L2Segments
{
get
{
return SkyScanner.Instance.Entities.L2SegmentCollection.Query("PoPs[]", this);
}
}
2019-04-08 08:47:12 +02:00
public PointOfPresence()
{
}
2019-04-11 08:30:13 +02:00
public void AddNode(Node node) => Nodes.Add(node);
public void RemoveNode(Node node) => Nodes.Remove(node);
2019-04-08 08:47:12 +02:00
}
}