Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: move using directive to top #68

Merged
merged 3 commits into from
Feb 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ csharp_prefer_braces = when_multiline:warning
csharp_prefer_simple_using_statement = true:warning

csharp_using_directive_placement = outside_namespace
csharp_style_namespace_declarations = file_scoped

csharp_prefer_static_local_function = true:warning

Expand Down
4 changes: 2 additions & 2 deletions sandbox/Benchmark/BenchmarkConfig.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
namespace Benchmark;

using BenchmarkDotNet.Configs;
using BenchmarkDotNet.Environments;
using BenchmarkDotNet.Jobs;

namespace Benchmark;

public class BenchmarkConfig : ManualConfig
{
public BenchmarkConfig()
Expand Down
5 changes: 2 additions & 3 deletions sandbox/Benchmark/WritableOptionsBenchmark.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#nullable disable
namespace Benchmark;

using System.IO;
using BenchmarkDotNet.Attributes;

namespace Benchmark;

[Config(typeof(BenchmarkConfig))]
public class WritableOptionsBenchmark
{
Expand Down
4 changes: 2 additions & 2 deletions src/Nogic.WritableOptions/IWritableOptions.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
namespace Nogic.WritableOptions;

using Microsoft.Extensions.Options;

namespace Nogic.WritableOptions;

/// <summary>
/// Used to access or update the value of <typeparamref name="TOptions"/>.
/// </summary>
Expand Down
5 changes: 2 additions & 3 deletions src/Nogic.WritableOptions/JsonWritableOptions.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
namespace Nogic.WritableOptions;

using System.IO;
using System.Text;
using System.Text.Encodings.Web;
using System.Text.Json;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Options;

namespace Nogic.WritableOptions;

/// <summary>
/// Read and write <typeparamref name="TOptions"/> in JSON file.
/// </summary>
Expand Down
5 changes: 2 additions & 3 deletions src/Nogic.WritableOptions/ServiceCollectionExtension.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
namespace Nogic.WritableOptions;

using System.IO;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Options;

namespace Nogic.WritableOptions;

/// <summary>
/// Extension methods for adding configuration related writable options services to the DI container.
/// </summary>
Expand Down
5 changes: 2 additions & 3 deletions test/Nogic.WritableOptions.Tests/JsonWritableOptions.Test.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
namespace Nogic.WritableOptions.Tests;

using System.IO;
using System.Text;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Options;
using Moq;

namespace Nogic.WritableOptions.Tests;

/// <summary>
/// Unit Test Class for <see cref="JsonWritableOptions{TOptions}"/>.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
namespace Nogic.WritableOptions.Tests;

using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;

namespace Nogic.WritableOptions.Tests;

/// <summary>
/// Unit Test Class for <see cref="ServiceCollectionExtension"/>.
/// </summary>
Expand Down