ln.provider.netwatch/entities/Layer2Segment.cs

43 lines
1.0 KiB
C#

// /**
// * File: Layer2Segment.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.net;
using ln.types.threads;
using ln.logging;
using ln.manage;
namespace ln.provider.netwatch.entities
{
public class Layer2Segment : IDisposable
{
[PropertyDescriptor(Identity = true)]
public String Name { get; set; } = Guid.NewGuid().ToString();
public IPv6[] Subnets { get; set; }
public NetworkDevice[] Devices { get; set; }
public int ServiceLevel { get; set; }
public Layer2Segment()
{
SchedulingPool.Default.Schedule(Check, 6000);
}
public void Check()
{
Logging.Log(LogLevel.DEBUG, "Layer2Segment {0}: Check()", Name);
}
public void Dispose()
{
SchedulingPool.Default.Unschedule(Check);
}
}
}