ToString overrides

This commit is contained in:
glax 2024-01-17 23:12:51 +01:00
parent c333adb2e4
commit 907089abe1
4 changed files with 20 additions and 12 deletions

View File

@ -19,4 +19,9 @@ public abstract class RandomIntegerRange
{
return Random.Shared.Next(this.Min, this.Max);
}
public override string ToString()
{
return $"Min: {Min} Max: {Max}";
}
}

View File

@ -1,12 +0,0 @@
namespace CShocker.Ranges;
public struct Range
{
public short Min, Max;
public Range(short min, short max)
{
Min = min;
Max = max;
}
}

View File

@ -14,4 +14,11 @@ public abstract class HttpShocker : Shocker
Endpoint = endpoint;
ApiKey = apiKey;
}
public override string ToString()
{
return $"{base.ToString()}\n" +
$"Endpoint: {Endpoint}\n" +
$"ApiKey: {ApiKey}";
}
}

View File

@ -41,4 +41,12 @@ public abstract class Shocker
{
this.Logger = logger;
}
public override string ToString()
{
return $"ShockerType: {Enum.GetName(typeof(ShockerApi), this.ApiType)}\n" +
$"Shocker-IDs: {string.Join(", ", this.ShockerIds)}\n" +
$"IntensityRange: {IntensityRange}\n" +
$"DurationRange: {DurationRange}";
}
}