Introduce Feedser plugin scaffolding
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using StellOps.AddOn;
|
||||
|
||||
namespace StellaOps.Feedser.Source.Acsc;
|
||||
|
||||
public sealed class AcscConnectorPlugin : IConnectorPlugin
|
||||
{
|
||||
public string Name => "acsc";
|
||||
|
||||
public bool IsAvailable(IServiceProvider services) => true;
|
||||
|
||||
public IFeedConnector Create(IServiceProvider services) => new StubConnector(Name);
|
||||
|
||||
private sealed class StubConnector : IFeedConnector
|
||||
{
|
||||
public StubConnector(string sourceName) => SourceName = sourceName;
|
||||
|
||||
public string SourceName { get; }
|
||||
|
||||
public Task FetchAsync(IServiceProvider services, CancellationToken cancellationToken) => Task.CompletedTask;
|
||||
|
||||
public Task ParseAsync(IServiceProvider services, CancellationToken cancellationToken) => Task.CompletedTask;
|
||||
|
||||
public Task MapAsync(IServiceProvider services, CancellationToken cancellationToken) => Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user