ln.skyscanner/entities/PointOfPresence.cs

53 lines
1.3 KiB
C#

// /**
// * 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;
using ln.types.odb.collections;
namespace ln.skyscanner.entities
{
public class PointOfPresence
{
[DocumentID]
public Guid ID = Guid.NewGuid();
public String Name { get; set; }
public String ForeignName { get; set; }
public RefList<Node> Nodes { get; private set; } = new RefList<Node>();
public GeoLocation GeoLocation { get; set; }
public DateTime Created { get; private set; } = DateTime.Now;
[JsonIgnore]
public IEnumerable<L2Segment> L2Segments
{
get
{
return SkyScanner.Instance.Entities.L2SegmentCollection.Query("PoPs[]", this);
}
}
public PointOfPresence()
{
}
public void AddNode(Node node) => Nodes.Add(node);
public void RemoveNode(Node node) => Nodes.Remove(node);
}
}