Compare commits

...

2 Commits

Author SHA1 Message Date
3340bb227b Public Fields 2024-01-17 19:33:57 +01:00
3703d50d71 Revert "shockerId"
This reverts commit 431f4f52ad.
2024-01-17 19:33:06 +01:00
3 changed files with 6 additions and 8 deletions

View File

@ -7,7 +7,7 @@
<Authors>Glax</Authors> <Authors>Glax</Authors>
<RepositoryUrl>https://github.com/C9Glax/CShocker</RepositoryUrl> <RepositoryUrl>https://github.com/C9Glax/CShocker</RepositoryUrl>
<RepositoryType>git</RepositoryType> <RepositoryType>git</RepositoryType>
<Version>1.1.1</Version> <Version>1.1.2</Version>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@ -6,8 +6,8 @@ namespace CShocker.Shockers.Abstract;
public abstract class HttpShocker : Shocker public abstract class HttpShocker : Shocker
{ {
protected readonly HttpClient HttpClient = new(); protected readonly HttpClient HttpClient = new();
protected string Endpoint { get; init; } public string Endpoint { get; init; }
protected string ApiKey { get; init; } public string ApiKey { get; init; }
protected HttpShocker(List<string> shockerIds, IntensityRange intensityRange, DurationRange durationRange, string endpoint, string apiKey, ILogger? logger = null) : base(shockerIds, intensityRange, durationRange, logger) protected HttpShocker(List<string> shockerIds, IntensityRange intensityRange, DurationRange durationRange, string endpoint, string apiKey, ILogger? logger = null) : base(shockerIds, intensityRange, durationRange, logger)
{ {

View File

@ -5,12 +5,10 @@ namespace CShocker.Shockers.Abstract;
public abstract class Shocker public abstract class Shocker
{ {
protected readonly List<string> ShockerIds; public readonly List<string> ShockerIds;
protected readonly IntensityRange IntensityRange; public readonly IntensityRange IntensityRange;
protected readonly DurationRange DurationRange; public readonly DurationRange DurationRange;
protected readonly ILogger? Logger; protected readonly ILogger? Logger;
private static int _shockerNumber = 0;
public int ShockerId = _shockerNumber++;
public void Control(ControlAction action, string? shockerId = null, int? intensity = null, int? duration = null) public void Control(ControlAction action, string? shockerId = null, int? intensity = null, int? duration = null)
{ {