Skip to content

Commit b4e2b69

Browse files
authored
1655 doc with options obsolete usage of with (#1657)
* Remove internal methods not usable outside the assembly - The `ConfigOptionsExtensions` is a internal static class * Replace the method `With` (deprecated) by `WithOptions`
1 parent d758f63 commit b4e2b69

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

docs/articles/configs/configoptions.md

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,12 @@ public class Config : ManualConfig
2727
{
2828
public Config()
2929
{
30-
Options.Set(true, ConfigOptions.JoinSummary);
31-
Options.Set(true, ConfigOptions.DisableLogFile);
32-
33-
// or
34-
Options.Set(true, ConfigOptions.JoinSummary | ConfigOptions.DisableLogFile);
35-
36-
// or using the With() factory method:
37-
this.With(ConfigOptions.JoinSummary)
38-
.With(ConfigOptions.DisableLogFile);
30+
// Using the WithOptions() factory method:
31+
this.WithOptions(ConfigOptions.JoinSummary)
32+
.WithOptions(ConfigOptions.DisableLogFile);
33+
34+
// Or (The ConfigOptions Enum is defined as a BitField)
35+
this.WithOptions(ConfigOptions.JoinSummary | ConfigOptions.DisableLogFile);
3936

4037
}
4138
}
@@ -50,9 +47,9 @@ public class Config : ManualConfig
5047
.Run<Benchmarks>(
5148
ManualConfig
5249
.Create(DefaultConfig.Instance)
53-
.With(ConfigOptions.JoinSummary)
54-
.With(ConfigOptions.DisableLogFile)
50+
.WithOptions(ConfigOptions.JoinSummary)
51+
.WithOptions(ConfigOptions.DisableLogFile)
5552
// or
56-
.With(ConfigOptions.JoinSummary | ConfigOptions.DisableLogFile));
53+
.WithOptions(ConfigOptions.JoinSummary | ConfigOptions.DisableLogFile));
5754
}
5855
```

0 commit comments

Comments
 (0)