44 lines
1.0 KiB
C#
44 lines
1.0 KiB
C#
// /**
|
|
// * File: CrawlService.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 System.Collections.Generic;
|
|
|
|
|
|
namespace ln.skyscanner.crawl.service
|
|
{
|
|
public abstract class CrawlService
|
|
{
|
|
public String Name { get; }
|
|
|
|
public CrawlService(String name)
|
|
{
|
|
Name = name;
|
|
}
|
|
|
|
public abstract bool Check(Crawl crawl); // Run the crawl scan
|
|
public abstract bool HostProvidesOption(Crawl crawl,params object[] parameters);
|
|
|
|
|
|
static List<CrawlService> services = new List<CrawlService>();
|
|
public static void RegisterService(CrawlService service)
|
|
{
|
|
services.Add(service);
|
|
}
|
|
|
|
public static CrawlService[] Services => services.ToArray();
|
|
|
|
static CrawlService()
|
|
{
|
|
RegisterService(new ICMP());
|
|
}
|
|
|
|
}
|
|
}
|