Provides a mechanism to make debugging an application a little easier: using the disposable pattern, surround a block of code with the scope for this item's disposal and you'll get:
More...
|
| SingleDebuggerBlock (string identifier) |
| Constructs the block with the provided identifier.
|
void | Dispose () |
|
static IDisposable | BlockIfEnvironmentVariableFlagSet (string environmentVariable, string identifier) |
| Creates a proper single debugger block when the environment variable with the provided name is set to a truthy value (eg "1", "yes", "true"), otherwise provides a null-disposable which doesn't interrupt flow.
|
static IDisposable | BlockIf (bool flag, string identifier) |
| Creates a proper single debugger block when the flag parameter is true, otherwise provides a null-disposable which doesn't interrupt flow.
|
Provides a mechanism to make debugging an application a little easier: using the disposable pattern, surround a block of code with the scope for this item's disposal and you'll get:
- Execution will wait for a debugger to be attached
- The block will be locked for the duration of the scope so that you don't have to deal with contending threads Usage: create a using block around the code you want to debug and ensure you have a breakpoint in that block then start up your application and attach a debugger WARNING: since the code will wait for an attached debugger, you should not leave this unattended
◆ SingleDebuggerBlock()
PeanutButter.Utils.SingleDebuggerBlock.SingleDebuggerBlock |
( |
string | identifier | ) |
|
Constructs the block with the provided identifier.
- Parameters
-
◆ BlockIf()
IDisposable PeanutButter.Utils.SingleDebuggerBlock.BlockIf |
( |
bool | flag, |
|
|
string | identifier ) |
|
static |
Creates a proper single debugger block when the flag parameter is true, otherwise provides a null-disposable which doesn't interrupt flow.
- Parameters
-
- Returns
◆ BlockIfEnvironmentVariableFlagSet()
IDisposable PeanutButter.Utils.SingleDebuggerBlock.BlockIfEnvironmentVariableFlagSet |
( |
string | environmentVariable, |
|
|
string | identifier ) |
|
static |
Creates a proper single debugger block when the environment variable with the provided name is set to a truthy value (eg "1", "yes", "true"), otherwise provides a null-disposable which doesn't interrupt flow.
- Parameters
-
environmentVariable | |
identifier | |
- Returns
The documentation for this class was generated from the following file:
- source/Utils/PeanutButter.Utils/SingleDebuggerBlock.cs