SnapshotSettingsScrubberExtensions Class

Provides extension methods for adding scrubbers to SnapshotSettings.

public static class SnapshotSettingsScrubberExtensions

Methods

NameDescription
SnapshotSettings.ScrubLines(Func<string, bool>)Adds a scrubber that removes lines matching the specified predicate.
SnapshotSettings.ScrubLinesContaining(StringComparison, string[])Adds a scrubber that removes lines containing any of the specified text values with the specified comparison.
SnapshotSettings.ScrubLinesContaining(string[])Adds a scrubber that removes lines containing any of the specified text values (case-insensitive).
SnapshotSettings.ScrubLinesMatching(string)Adds a scrubber that removes lines matching the specified regular expression pattern.
SnapshotSettings.ScrubLinesMatching(string, RegexOptions)Adds a scrubber that removes lines matching the specified regular expression pattern with options.
SnapshotSettings.ScrubLinesMatching(string, RegexOptions, TimeSpan)Adds a scrubber that removes lines matching the specified regular expression pattern with options and timeout.
SnapshotSettings.ScrubLinesMatching(Regex)Adds a scrubber that removes lines matching the specified regular expression.
SnapshotSettings.ScrubLinesWithReplace(Func<string, string?>)Adds a scrubber that replaces each line using the specified function.
SnapshotSettings.ScrubMachineName()Adds a scrubber that replaces the machine name with a consistent value.
SnapshotSettings.ScrubUserName()Adds a scrubber that replaces the user name with a consistent value.

SnapshotSettings.ScrubLines(Func<string, bool>)

SnapshotSettingsScrubberExtensions.cs

Adds a scrubber that removes lines matching the specified predicate.

extension(SnapshotSettings settings)
{
    public void ScrubLines(Func<string, bool> predicate)
}

Parameters

settings SnapshotSettings
predicate Func<string, bool>

SnapshotSettings.ScrubLinesContaining overloads

SnapshotSettings.ScrubLinesContaining(StringComparison, string[])

SnapshotSettingsScrubberExtensions.cs

Adds a scrubber that removes lines containing any of the specified text values with the specified comparison.

extension(SnapshotSettings settings)
{
    public void ScrubLinesContaining(StringComparison stringComparison, params string[] searchText)
}
Parameters
settings SnapshotSettings
stringComparison StringComparison
searchText string[]

SnapshotSettings.ScrubLinesContaining(string[])

SnapshotSettingsScrubberExtensions.cs

Adds a scrubber that removes lines containing any of the specified text values (case-insensitive).

extension(SnapshotSettings settings)
{
    public void ScrubLinesContaining(params string[] searchText)
}
Parameters
settings SnapshotSettings
searchText string[]

SnapshotSettings.ScrubLinesMatching overloads

SnapshotSettings.ScrubLinesMatching(string)

SnapshotSettingsScrubberExtensions.cs

Adds a scrubber that removes lines matching the specified regular expression pattern.

extension(SnapshotSettings settings)
{
    public void ScrubLinesMatching(string pattern)
}
Parameters
settings SnapshotSettings
pattern string

SnapshotSettings.ScrubLinesMatching(string, RegexOptions)

SnapshotSettingsScrubberExtensions.cs

Adds a scrubber that removes lines matching the specified regular expression pattern with options.

extension(SnapshotSettings settings)
{
    public void ScrubLinesMatching(string pattern, RegexOptions options)
}
Parameters
settings SnapshotSettings
pattern string
options RegexOptions

SnapshotSettings.ScrubLinesMatching(string, RegexOptions, TimeSpan)

SnapshotSettingsScrubberExtensions.cs

Adds a scrubber that removes lines matching the specified regular expression pattern with options and timeout.

extension(SnapshotSettings settings)
{
    public void ScrubLinesMatching(string pattern, RegexOptions options, TimeSpan matchTimeout)
}
Parameters
settings SnapshotSettings
pattern string
options RegexOptions
matchTimeout TimeSpan

SnapshotSettings.ScrubLinesMatching(Regex)

SnapshotSettingsScrubberExtensions.cs

Adds a scrubber that removes lines matching the specified regular expression.

extension(SnapshotSettings settings)
{
    public void ScrubLinesMatching(Regex regex)
}
Parameters
settings SnapshotSettings
regex Regex

SnapshotSettings.ScrubLinesWithReplace(Func<string, string?>)

SnapshotSettingsScrubberExtensions.cs

Adds a scrubber that replaces each line using the specified function.

extension(SnapshotSettings settings)
{
    public void ScrubLinesWithReplace(Func<string, string?> replaceLine)
}

Parameters

settings SnapshotSettings
replaceLine Func<string, string?>

SnapshotSettings.ScrubMachineName()

SnapshotSettingsScrubberExtensions.cs

Adds a scrubber that replaces the machine name with a consistent value.

extension(SnapshotSettings settings)
{
    public void ScrubMachineName()
}

Parameters

settings SnapshotSettings

Remarks

Only whole words are replaced, ignoring case. Does nothing when Environment.MachineName is empty.

SnapshotSettings.ScrubUserName()

SnapshotSettingsScrubberExtensions.cs

Adds a scrubber that replaces the user name with a consistent value.

extension(SnapshotSettings settings)
{
    public void ScrubUserName()
}

Parameters

settings SnapshotSettings

Remarks

Only whole words are replaced, ignoring case. Does nothing when Environment.UserName is empty.