Skip to content

Commit

Permalink
1655 doc with options obsolete usage of with (#1657)
Browse files Browse the repository at this point in the history
* Remove internal methods not usable outside the assembly
- The `ConfigOptionsExtensions` is a internal static class

* Replace the method `With` (deprecated) by `WithOptions`
  • Loading branch information
cedric-cf committed Feb 25, 2021
1 parent d758f63 commit b4e2b69
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions docs/articles/configs/configoptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,12 @@ public class Config : ManualConfig
{
public Config()
{
Options.Set(true, ConfigOptions.JoinSummary);
Options.Set(true, ConfigOptions.DisableLogFile);

// or
Options.Set(true, ConfigOptions.JoinSummary | ConfigOptions.DisableLogFile);

// or using the With() factory method:
this.With(ConfigOptions.JoinSummary)
.With(ConfigOptions.DisableLogFile);
// Using the WithOptions() factory method:
this.WithOptions(ConfigOptions.JoinSummary)
.WithOptions(ConfigOptions.DisableLogFile);

// Or (The ConfigOptions Enum is defined as a BitField)
this.WithOptions(ConfigOptions.JoinSummary | ConfigOptions.DisableLogFile);

}
}
Expand All @@ -50,9 +47,9 @@ public class Config : ManualConfig
.Run<Benchmarks>(
ManualConfig
.Create(DefaultConfig.Instance)
.With(ConfigOptions.JoinSummary)
.With(ConfigOptions.DisableLogFile)
.WithOptions(ConfigOptions.JoinSummary)
.WithOptions(ConfigOptions.DisableLogFile)
// or
.With(ConfigOptions.JoinSummary | ConfigOptions.DisableLogFile));
.WithOptions(ConfigOptions.JoinSummary | ConfigOptions.DisableLogFile));
}
```

0 comments on commit b4e2b69

Please sign in to comment.