Fixes a bug where simulated packet loss and latency does not work unless end-user cloned repo. This is because those features were locked behind the DEBUG pre-processor tag. This PR replaces the #if DEBUG pre-processing tags with methods guarded by the [Conditional("DEBUG")] attribute instead.
Testing
Case: Simulate* = true + DEBUG defined.
Result: Packet loss and latency is simulated ✔️
Case: Simulate* = true + DEBUG not defined.
Result: Packet loss and latency is not simulated ✔️
Case: Simulate* = false + DEBUG defined.
Result: Packet loss and latency is not simulated ✔️
Case: Simulate* = false + DEBUG not defined.
Result: Packet loss and latency is not simulated ✔️
Fixes a bug where simulated packet loss and latency does not work unless end-user cloned repo. This is because those features were locked behind the DEBUG pre-processor tag. This PR replaces the
#if DEBUG
pre-processing tags with methods guarded by the[Conditional("DEBUG")]
attribute instead.Testing
Simulate* = true
+DEBUG
defined.Simulate* = true
+DEBUG
not defined.Simulate* = false
+DEBUG
defined.Simulate* = false
+DEBUG
not defined.