// /** // * File: SkyCheck.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.skyscanner.entities; using System.IO; using System.Collections.Generic; using ln.skyscanner.services; namespace ln.skyscanner.checks { public abstract class SkyCheck { /* Static */ static List skyChecks = new List(); public static SkyCheck[] SkyChecks => skyChecks.ToArray(); public static void AddSkyCheck(SkyCheck skyCheck) => skyChecks.Add(skyCheck); /* Instance */ public SkyCheck(String checkName) { Name = checkName; } public string Name { get; } public virtual bool IsCritical => false; public abstract bool IsValid(Node node); public abstract void Check(CheckService checkService,ref SkyCheckState checkState,Node node); public virtual SkyCheckState PrepareCheckState(CheckService skyChecker,Node node) { return new SkyCheckState(this, node); } static SkyCheck() { AddSkyCheck(new Hostalive()); AddSkyCheck(new Ubiquiti()); AddSkyCheck(new Mimosa()); //AddSkyCheck(new SikluCheck()); AddSkyCheck(new APC()); } } }