Skip to content

Commit

Permalink
Merge namespaces (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gitii authored Jun 12, 2022
1 parent b6c40b2 commit 1c6e874
Show file tree
Hide file tree
Showing 18 changed files with 15 additions and 23 deletions.
1 change: 0 additions & 1 deletion Community.Wsl.Sdk.Tests/CommandTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using Community.Wsl.Sdk.Strategies.Commands;
using Community.Wsx.Shared;
using FakeItEasy;
using FluentAssertions;
Expand Down
1 change: 0 additions & 1 deletion Community.Wsl.Sdk.Tests/DistroInfoTests.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using Community.Wsl.Sdk.Strategies.Api;
using FluentAssertions;
using NUnit.Framework;

Expand Down
1 change: 0 additions & 1 deletion Community.Wsl.Sdk.Tests/StreamDataReaderTests.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using System.IO;
using System.Threading.Tasks;
using Community.Wsl.Sdk.Strategies.Commands;
using FluentAssertions;
using NUnit.Framework;

Expand Down
1 change: 0 additions & 1 deletion Community.Wsl.Sdk.Tests/StreamNullReaderTests.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Threading.Tasks;
using Community.Wsl.Sdk.Strategies.Commands;
using FluentAssertions;
using NUnit.Framework;

Expand Down
1 change: 0 additions & 1 deletion Community.Wsl.Sdk.Tests/StreamStringReaderTests.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.IO;
using Community.Wsl.Sdk.Strategies.Commands;
using FluentAssertions;
using NUnit.Framework;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Threading.Tasks;
using Community.Wsx.Shared;

namespace Community.Wsl.Sdk.Strategies.Commands;
namespace Community.Wsl.Sdk;

public class Command : ICommand
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.IO;

namespace Community.Wsl.Sdk.Strategies.Commands;
namespace Community.Wsl.Sdk;

/// <summary>
/// Encapsulates the io stream of a <see cref="ICommand"/>.
Expand Down
2 changes: 1 addition & 1 deletion Community.Wsl.Sdk/Community.Wsl.Sdk.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFrameworks>net6.0-windows</TargetFrameworks>
<SupportedOSPlatform>windows</SupportedOSPlatform>
<Description>SDK for Windows Subsystem for Linux for .NET 6</Description>
<Copyright>(c) 2022 Gitii</Copyright>
<Copyright>(c) 2021 Gitii</Copyright>
<PackageProjectUrl>https://github.com/Gitii/community.wsl.sdk</PackageProjectUrl>
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;

namespace Community.Wsl.Sdk.Strategies.Api;
namespace Community.Wsl.Sdk;

/// <summary>
/// The enumeration specifies the behavior of a distribution in the Windows Subsystem for Linux (WSL).
Expand All @@ -27,4 +27,4 @@ public enum DistroFlags
/// Automatically mount Windows drives inside of WSL sessions (for example, "C:" will be available under "/mnt/c").
/// </summary>
EnableDriveMouting = 0x4
}
}
1 change: 0 additions & 1 deletion Community.Wsl.Sdk/DistroInfo.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using Community.Wsl.Sdk.Strategies.Api;

namespace Community.Wsl.Sdk;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Threading.Tasks;

namespace Community.Wsl.Sdk.Strategies.Commands;
namespace Community.Wsl.Sdk;

public interface ICommand : IDisposable
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Threading.Tasks;

namespace Community.Wsl.Sdk.Strategies.Commands;
namespace Community.Wsl.Sdk;

internal interface IStreamReader
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using System.IO;
using System.Linq;

namespace Community.Wsl.Sdk.Strategies.Api;
namespace Community.Wsl.Sdk;

/// <summary>
/// Provides functionality to help you call WSL from .NET applications.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using System.Threading;
using System.Threading.Tasks;

namespace Community.Wsl.Sdk.Strategies.Commands;
namespace Community.Wsl.Sdk;

internal class StreamDataReader : IStreamReader
{
Expand Down Expand Up @@ -45,10 +45,7 @@ public void Fetch()
var data = stream.ToArray();
Finished(data);
}
)
{
IsBackground = true
};
) { IsBackground = true };

_thread.Start();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Threading.Tasks;

namespace Community.Wsl.Sdk.Strategies.Commands;
namespace Community.Wsl.Sdk;

internal class StreamNullReader : IStreamReader
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.IO;

namespace Community.Wsl.Sdk.Strategies.Commands;
namespace Community.Wsl.Sdk;

internal class StreamStringReader : StreamDataReader
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Linq;
using Community.Wsx.Shared;

namespace Community.Wsl.Sdk.Strategies.Api;
namespace Community.Wsl.Sdk;

/// <summary>
/// <inheritdoc cref="IWslApi"/>
Expand Down Expand Up @@ -96,7 +96,7 @@ public IReadOnlyList<DistroInfo> GetDistroList()
(keyName) =>
ReadFromRegistryKey(
lxssKey.OpenSubKey(keyName)!,
Guid.Parse(keyName),
Guid.Parse((string)keyName),
defaultGuid
)
)
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ Breaking changes:
* Support for Net. 5 has been removed. Net. 5 is [out of support since May 10, 2022](https://dotnet.microsoft.com/en-us/platform/support/policy/dotnet-core).
* Support for .NET Core 3.1 has been removed. .NET Core 3.1 will be [out of support after December 13, 2022](https://dotnet.microsoft.com/en-us/platform/support/policy/dotnet-core).
* Migrated to `Community.Wsx.Shared` (replaces most interfaces and implementations for )
* Moved classes & interfaces in `Strategies.{Api,Commands}.*` to root namespace.

Please upgrade to a newer .NET and .NET Core runtime version.
The minimum supported Net. version is Net. 6.

0 comments on commit 1c6e874

Please sign in to comment.