using System.Threading; using System.Threading.Tasks; namespace NucuCar.Telemetry.Abstractions { public interface ITelemetryPublisher { /// /// Publishes telemetry data. /// /// A cancellation token. /// A task public abstract Task PublishAsync(CancellationToken cancellationToken); /// /// Adds a telemeter to the collection. /// The telemeter can register only once. /// /// The /// Returns true if the telemeter has registered successfully and false otherwise. public bool RegisterTelemeter(ITelemeter t); /// /// Method that deletes a telemeter from the collection. /// /// The /// Returns true if the telemeter has unregistered successfully and false otherwise. public bool UnRegisterTelemeter(ITelemeter t); } }