Skip to content

Commit 613b0e5

Browse files
authored
File-scoped namespaces (#3030)
1 parent c9f9cf9 commit 613b0e5

36 files changed

+2760
-2801
lines changed

src/tools/Reporting/Reporting/Build.cs

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,23 @@
77
using System.Collections.Generic;
88
using System.Text;
99

10-
namespace Reporting
10+
namespace Reporting;
11+
12+
public sealed class Build
1113
{
12-
public sealed class Build
13-
{
14-
public string Repo { get; set; }
14+
public string Repo { get; set; }
1515

16-
public string Branch { get; set; }
16+
public string Branch { get; set; }
1717

18-
public string Architecture { get; set; }
18+
public string Architecture { get; set; }
1919

20-
public string Locale { get; set; }
20+
public string Locale { get; set; }
2121

22-
public string GitHash { get; set; }
22+
public string GitHash { get; set; }
2323

24-
public string BuildName { get; set; }
24+
public string BuildName { get; set; }
2525

26-
public DateTime TimeStamp { get; set; }
26+
public DateTime TimeStamp { get; set; }
2727

28-
public Dictionary<string, string> AdditionalData { get; set; } = new Dictionary<string, string>();
29-
}
28+
public Dictionary<string, string> AdditionalData { get; set; } = new Dictionary<string, string>();
3029
}

src/tools/Reporting/Reporting/Counter.cs

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,16 @@
44

55
using System.Collections.Generic;
66

7-
namespace Reporting
7+
namespace Reporting;
8+
9+
public class Counter
810
{
9-
public class Counter
10-
{
11-
public string Name { get; set; }
12-
public bool TopCounter { get; set; }
13-
public bool DefaultCounter { get; set; }
14-
public bool HigherIsBetter { get; set; }
15-
public string MetricName { get; set; }
16-
public IList<double> Results { get; set; }
11+
public string Name { get; set; }
12+
public bool TopCounter { get; set; }
13+
public bool DefaultCounter { get; set; }
14+
public bool HigherIsBetter { get; set; }
15+
public string MetricName { get; set; }
16+
public IList<double> Results { get; set; }
1717

18-
public override string ToString() => $"{nameof(Name)}: {Name}, {nameof(TopCounter)}: {TopCounter}, {nameof(DefaultCounter)}: {DefaultCounter}, {nameof(MetricName)}: {MetricName}";
19-
}
18+
public override string ToString() => $"{nameof(Name)}: {Name}, {nameof(TopCounter)}: {TopCounter}, {nameof(DefaultCounter)}: {DefaultCounter}, {nameof(MetricName)}: {MetricName}";
2019
}

src/tools/Reporting/Reporting/EnvironmentProvider.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@
66
using System.Collections.Generic;
77
using System.Text;
88

9-
namespace Reporting
9+
namespace Reporting;
10+
11+
public class EnvironmentProvider : IEnvironment
1012
{
11-
public class EnvironmentProvider : IEnvironment
12-
{
13-
public string GetEnvironmentVariable(string variable) => Environment.GetEnvironmentVariable(variable);
14-
public System.Collections.IDictionary GetEnvironmentVariables() => Environment.GetEnvironmentVariables();
15-
}
13+
public string GetEnvironmentVariable(string variable) => Environment.GetEnvironmentVariable(variable);
14+
public System.Collections.IDictionary GetEnvironmentVariables() => Environment.GetEnvironmentVariables();
1615
}

src/tools/Reporting/Reporting/IEnvironment.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5-
namespace Reporting
5+
namespace Reporting;
6+
7+
public interface IEnvironment
68
{
7-
public interface IEnvironment
8-
{
9-
string GetEnvironmentVariable(string variable);
10-
System.Collections.IDictionary GetEnvironmentVariables();
11-
}
9+
string GetEnvironmentVariable(string variable);
10+
System.Collections.IDictionary GetEnvironmentVariables();
1211
}

src/tools/Reporting/Reporting/Os.cs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,15 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5-
namespace Reporting
5+
namespace Reporting;
6+
7+
public class Os
68
{
7-
public class Os
8-
{
9-
public string Locale { get; set; }
9+
public string Locale { get; set; }
1010

11-
public string Architecture { get; set; }
11+
public string Architecture { get; set; }
1212

13-
public string Name { get; set; }
13+
public string Name { get; set; }
1414

15-
public string MachineName { get; set; }
16-
}
15+
public string MachineName { get; set; }
1716
}

0 commit comments

Comments
 (0)