Compare commits

..

No commits in common. "3340bb227b98fba26e3133e12ef6781b5df57606" and "431f4f52ad69b533b006b58d7c590dcd76baf1a1" have entirely different histories.

3 changed files with 8 additions and 6 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.2</Version> <Version>1.1.1</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();
public string Endpoint { get; init; } protected string Endpoint { get; init; }
public string ApiKey { get; init; } protected 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,10 +5,12 @@ namespace CShocker.Shockers.Abstract;
public abstract class Shocker public abstract class Shocker
{ {
public readonly List<string> ShockerIds; protected readonly List<string> ShockerIds;
public readonly IntensityRange IntensityRange; protected readonly IntensityRange IntensityRange;
public readonly DurationRange DurationRange; protected 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)
{ {