Begins a section with the specified name. May be nested.
Namespace:
Gallio.FrameworkAssembly: Gallio (in Gallio.dll) Version: 3.3.0.0 (3.3.459.0)
Syntax
| C# |
|---|
public static IDisposable BeginSection( string sectionName ) |
| Visual Basic (Declaration) |
|---|
Public Shared Function BeginSection ( _ sectionName As String _ ) As IDisposable |
Parameters
- sectionName
- Type: System..::.String
The name of the section.
Return Value
A Disposable object that calls End()()() when disposed. This is a convenience for use with the C# "using" statement.
Remarks
A section groups together related content in the test log to make it easier to distinguish. The section name is used as a heading.
This is a convenience method that forwards the request to the current default log stream writer as returned by the Default property.
Examples
using (Log.BeginSection("Doing something interesting")) { Log.WriteLine("Ah ha!"); }
Exceptions
| Exception | Condition |
|---|---|
| System..::.ArgumentNullException | Thrown if sectionName is null. |
