ToString overrides
This commit is contained in:
parent
c333adb2e4
commit
907089abe1
@ -19,4 +19,9 @@ public abstract class RandomIntegerRange
|
|||||||
{
|
{
|
||||||
return Random.Shared.Next(this.Min, this.Max);
|
return Random.Shared.Next(this.Min, this.Max);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override string ToString()
|
||||||
|
{
|
||||||
|
return $"Min: {Min} Max: {Max}";
|
||||||
|
}
|
||||||
}
|
}
|
@ -1,12 +0,0 @@
|
|||||||
namespace CShocker.Ranges;
|
|
||||||
|
|
||||||
public struct Range
|
|
||||||
{
|
|
||||||
public short Min, Max;
|
|
||||||
|
|
||||||
public Range(short min, short max)
|
|
||||||
{
|
|
||||||
Min = min;
|
|
||||||
Max = max;
|
|
||||||
}
|
|
||||||
}
|
|
@ -14,4 +14,11 @@ public abstract class HttpShocker : Shocker
|
|||||||
Endpoint = endpoint;
|
Endpoint = endpoint;
|
||||||
ApiKey = apiKey;
|
ApiKey = apiKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override string ToString()
|
||||||
|
{
|
||||||
|
return $"{base.ToString()}\n" +
|
||||||
|
$"Endpoint: {Endpoint}\n" +
|
||||||
|
$"ApiKey: {ApiKey}";
|
||||||
|
}
|
||||||
}
|
}
|
@ -41,4 +41,12 @@ public abstract class Shocker
|
|||||||
{
|
{
|
||||||
this.Logger = logger;
|
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}";
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user