Rewrite Hierachy that shockers now contain the api they use.

This commit is contained in:
2024-02-01 23:03:28 +01:00
parent 9596811ae7
commit 65059f66ed
18 changed files with 171 additions and 168 deletions

View File

@ -1,5 +1,24 @@
namespace CShocker.Shockers.Abstract;
using CShocker.Devices.Abstract;
using CShocker.Devices.Additional;
public interface IShocker
namespace CShocker.Shockers.Abstract;
public abstract class Shocker : IDisposable
{
public Api Api { get; }
internal Shocker(Api api)
{
this.Api = api;
}
public void Control(ControlAction action, int? intensity = null, int? duration = null)
{
this.Api.Control(action, intensity, duration, this);
}
public void Dispose()
{
Api.Dispose();
}
}