1
0
mirror of https://github.com/ZetaKebab/MpcNET.git synced 2024-09-16 05:30:09 +00:00

Renaming project folders

This commit is contained in:
glucaci 2017-04-12 12:11:27 +02:00
parent 73bc09aa9a
commit 301c5adf59
62 changed files with 125 additions and 120 deletions

19
.gitignore vendored
View File

@ -4,19 +4,12 @@
/src/.vs /src/.vs
/src/LibMpc/bin /src/MpcNET/bin
/src/LibMpc/obj /src/MpcNET/obj
/src/LibMpc/LibMpc.xproj.user
/src/LibMpc/project.lock.json
/src/LibMpcApp/bin /src/MpcNET.Test/bin
/src/LibMpcApp/obj /src/MpcNET.Test/obj
/src/LibMpcApp/LibMpcApp.xproj.user
/src/LibMpcApp/project.lock.json
/src/LibMpcTest/bin
/src/LibMpcTest/obj
/src/LibMpcTest/LibMpcTest.xproj.user
/src/LibMpcTest/project.lock.json
/src/LibMpc.sln.DotSettings.user /src/MpcNET.sln.DotSettings.user
/src/MpcNET.Test/MpcNET.Test.csproj.DotSettings

View File

@ -1,8 +1,6 @@
using LibMpc; using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
namespace LibMpcTest namespace MpcNET.Test
{ {
[TestClass] [TestClass]
public partial class LibMpcTest public partial class LibMpcTest

View File

@ -1,9 +1,8 @@
using LibMpc;
using System; using System;
using System.Net; using System.Net;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace LibMpcTest namespace MpcNET.Test
{ {
public class MpcMock : IDisposable public class MpcMock : IDisposable
{ {

View File

@ -2,31 +2,38 @@
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp1.0</TargetFramework> <TargetFramework>netcoreapp1.0</TargetFramework>
<AssemblyName>LibMpcTest</AssemblyName> <AssemblyName>MpcNET.Test</AssemblyName>
<PackageId>LibMpcTest</PackageId> <PackageId>MpcNET.Test</PackageId>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles> <GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<RuntimeFrameworkVersion>1.0.4</RuntimeFrameworkVersion> <RuntimeFrameworkVersion>1.0.4</RuntimeFrameworkVersion>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute> <GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute> <GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute> <GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<RootNamespace>MpcNET.Test</RootNamespace>
<SignAssembly>False</SignAssembly>
<DelaySign>True</DelaySign>
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<None Remove="MpcNET.Test.csproj.DotSettings" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<None Update="Server\**\*"> <None Update="Server\**\*">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
</ItemGroup> </ItemGroup>
<ItemGroup>
<ProjectReference Include="..\LibMpc\LibMpc.csproj" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" />
<PackageReference Include="MSTest.TestAdapter" Version="1.1.14" /> <PackageReference Include="MSTest.TestAdapter" Version="1.1.14" />
<PackageReference Include="MSTest.TestFramework" Version="1.1.14" /> <PackageReference Include="MSTest.TestFramework" Version="1.1.14" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<ProjectReference Include="..\MpcNET\MpcNET.csproj" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" /> <Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup> </ItemGroup>

View File

@ -1,7 +1,7 @@
using System.IO; using System.IO;
using System.Text; using System.Text;
namespace LibMpcTest namespace MpcNET.Test
{ {
public class MpdConf public class MpdConf
{ {

View File

@ -3,7 +3,7 @@ using System.Diagnostics;
using System.IO; using System.IO;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace LibMpcTest namespace MpcNET.Test
{ {
public class MpdMock : IDisposable public class MpdMock : IDisposable
{ {

View File

@ -1,6 +1,6 @@
using System; using System;
namespace LibMpcTest namespace MpcNET.Test
{ {
internal class TestOutput internal class TestOutput
{ {

View File

@ -1,17 +1,17 @@
using System.Threading.Tasks;
using Newtonsoft.Json;
using System.Linq; using System.Linq;
using LibMpc; using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
using MpcNET.Tags;
using Newtonsoft.Json;
namespace LibMpcTest namespace MpcNET.Test
{ {
public partial class LibMpcTest public partial class LibMpcTest
{ {
[TestMethod] [TestMethod]
public async Task ListAllTest() public async Task ListAllTest()
{ {
var response = await Mpc.SendAsync(new Commands.Database.ListAll()); var response = await Mpc.SendAsync(new Commands.Commands.Database.ListAll());
TestOutput.WriteLine("ListAllTest Result:"); TestOutput.WriteLine("ListAllTest Result:");
TestOutput.WriteLine(JsonConvert.SerializeObject(response, Formatting.Indented)); TestOutput.WriteLine(JsonConvert.SerializeObject(response, Formatting.Indented));
@ -22,7 +22,7 @@ namespace LibMpcTest
[TestMethod] [TestMethod]
public async Task FindGenreTest() public async Task FindGenreTest()
{ {
var response = await Mpc.SendAsync(new Commands.Database.Find(MpdTags.Genre, "soundfx")); var response = await Test.LibMpcTest.Mpc.SendAsync(new Commands.Commands.Database.Find(MpdTags.Genre, "soundfx"));
TestOutput.WriteLine("FindGenreTest Result:"); TestOutput.WriteLine("FindGenreTest Result:");
TestOutput.WriteLine(JsonConvert.SerializeObject(response, Formatting.Indented)); TestOutput.WriteLine(JsonConvert.SerializeObject(response, Formatting.Indented));

View File

@ -1,20 +1,19 @@
using System.Threading.Tasks;
using Newtonsoft.Json;
using LibMpc;
using System.Linq; using System.Linq;
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
using Newtonsoft.Json;
namespace LibMpcTest namespace MpcNET.Test
{ {
public partial class LibMpcTest public partial class LibMpcTest
{ {
[TestMethod] [TestMethod]
public async Task DisableOutputTest() public async Task DisableOutputTest()
{ {
var responseOutputs = await Mpc.SendAsync(new Commands.Output.Outputs()); var responseOutputs = await Mpc.SendAsync(new Commands.Commands.Output.Outputs());
Assert.IsTrue(responseOutputs.Response.Body.Single(output => output.Id.Equals(0)).IsEnabled); Assert.IsTrue(responseOutputs.Response.Body.Single(output => output.Id.Equals(0)).IsEnabled);
var response = await Mpc.SendAsync(new Commands.Output.DisableOutput(0)); var response = await Mpc.SendAsync(new Commands.Commands.Output.DisableOutput(0));
TestOutput.WriteLine("DisableOutputTest Result:"); TestOutput.WriteLine("DisableOutputTest Result:");
TestOutput.WriteLine(JsonConvert.SerializeObject(response, Formatting.Indented)); TestOutput.WriteLine(JsonConvert.SerializeObject(response, Formatting.Indented));
@ -22,18 +21,18 @@ namespace LibMpcTest
Assert.IsTrue(response.Response.Body.Equals(string.Empty)); Assert.IsTrue(response.Response.Body.Equals(string.Empty));
Assert.IsTrue(response.Response.State.Status.Equals("OK")); Assert.IsTrue(response.Response.State.Status.Equals("OK"));
responseOutputs = await Mpc.SendAsync(new Commands.Output.Outputs()); responseOutputs = await Mpc.SendAsync(new Commands.Commands.Output.Outputs());
Assert.IsFalse(responseOutputs.Response.Body.Single(output => output.Id.Equals(0)).IsEnabled); Assert.IsFalse(responseOutputs.Response.Body.Single(output => output.Id.Equals(0)).IsEnabled);
} }
[TestMethod] [TestMethod]
public async Task EnableOutputTest() public async Task EnableOutputTest()
{ {
var responseOutputs = await Mpc.SendAsync(new Commands.Output.Outputs()); var responseOutputs = await Mpc.SendAsync(new Commands.Commands.Output.Outputs());
// By default should be disable from mpd.config // By default should be disable from mpd.config
Assert.IsFalse(responseOutputs.Response.Body.Single(output => output.Id.Equals(1)).IsEnabled); Assert.IsFalse(responseOutputs.Response.Body.Single(output => output.Id.Equals(1)).IsEnabled);
var response = await Mpc.SendAsync(new Commands.Output.EnableOutput(1)); var response = await Mpc.SendAsync(new Commands.Commands.Output.EnableOutput(1));
TestOutput.WriteLine("EnableOutputTest Result:"); TestOutput.WriteLine("EnableOutputTest Result:");
TestOutput.WriteLine(JsonConvert.SerializeObject(response, Formatting.Indented)); TestOutput.WriteLine(JsonConvert.SerializeObject(response, Formatting.Indented));
@ -41,17 +40,17 @@ namespace LibMpcTest
Assert.IsTrue(response.Response.Body.Equals(string.Empty)); Assert.IsTrue(response.Response.Body.Equals(string.Empty));
Assert.IsTrue(response.Response.State.Status.Equals("OK")); Assert.IsTrue(response.Response.State.Status.Equals("OK"));
responseOutputs = await Mpc.SendAsync(new Commands.Output.Outputs()); responseOutputs = await Mpc.SendAsync(new Commands.Commands.Output.Outputs());
Assert.IsTrue(responseOutputs.Response.Body.Single(output => output.Id.Equals(1)).IsEnabled); Assert.IsTrue(responseOutputs.Response.Body.Single(output => output.Id.Equals(1)).IsEnabled);
} }
[TestMethod] [TestMethod]
public async Task ToggleOutputTest() public async Task ToggleOutputTest()
{ {
var responseOutputs = await Mpc.SendAsync(new Commands.Output.Outputs()); var responseOutputs = await Mpc.SendAsync(new Commands.Commands.Output.Outputs());
Assert.IsTrue(responseOutputs.Response.Body.Single(output => output.Id.Equals(2)).IsEnabled); Assert.IsTrue(responseOutputs.Response.Body.Single(output => output.Id.Equals(2)).IsEnabled);
var response = await Mpc.SendAsync(new Commands.Output.ToggleOutput(2)); var response = await Mpc.SendAsync(new Commands.Commands.Output.ToggleOutput(2));
TestOutput.WriteLine("ToggleOutputTest Result:"); TestOutput.WriteLine("ToggleOutputTest Result:");
TestOutput.WriteLine(JsonConvert.SerializeObject(response, Formatting.Indented)); TestOutput.WriteLine(JsonConvert.SerializeObject(response, Formatting.Indented));
@ -59,14 +58,14 @@ namespace LibMpcTest
Assert.IsTrue(response.Response.Body.Equals(string.Empty)); Assert.IsTrue(response.Response.Body.Equals(string.Empty));
Assert.IsTrue(response.Response.State.Status.Equals("OK")); Assert.IsTrue(response.Response.State.Status.Equals("OK"));
responseOutputs = await Mpc.SendAsync(new Commands.Output.Outputs()); responseOutputs = await Mpc.SendAsync(new Commands.Commands.Output.Outputs());
Assert.IsFalse(responseOutputs.Response.Body.Single(output => output.Id.Equals(2)).IsEnabled); Assert.IsFalse(responseOutputs.Response.Body.Single(output => output.Id.Equals(2)).IsEnabled);
} }
[TestMethod] [TestMethod]
public async Task LisOutputsTest() public async Task LisOutputsTest()
{ {
var response = await Mpc.SendAsync(new Commands.Output.Outputs()); var response = await Mpc.SendAsync(new Commands.Commands.Output.Outputs());
TestOutput.WriteLine("LisOutputsTest Result:"); TestOutput.WriteLine("LisOutputsTest Result:");
TestOutput.WriteLine(JsonConvert.SerializeObject(response, Formatting.Indented)); TestOutput.WriteLine(JsonConvert.SerializeObject(response, Formatting.Indented));

View File

@ -1,10 +1,9 @@
using System.Threading.Tasks; using System.Linq;
using Newtonsoft.Json; using System.Threading.Tasks;
using LibMpc;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
using Newtonsoft.Json;
namespace LibMpcTest namespace MpcNET.Test
{ {
public partial class LibMpcTest public partial class LibMpcTest
{ {
@ -14,7 +13,7 @@ namespace LibMpcTest
[DataRow("_My Playlist", 5)] [DataRow("_My Playlist", 5)]
public async Task ListPlaylistTest(string playlistName, int numberOfFiles) public async Task ListPlaylistTest(string playlistName, int numberOfFiles)
{ {
var response = await Mpc.SendAsync(new Commands.Playlists.Stored.ListPlaylist(playlistName)); var response = await Mpc.SendAsync(new Commands.Commands.Playlists.Stored.ListPlaylist(playlistName));
TestOutput.WriteLine($"ListPlaylistTest (playlistName: {playlistName}) Result:"); TestOutput.WriteLine($"ListPlaylistTest (playlistName: {playlistName}) Result:");
TestOutput.WriteLine(JsonConvert.SerializeObject(response, Formatting.Indented)); TestOutput.WriteLine(JsonConvert.SerializeObject(response, Formatting.Indented));
@ -28,7 +27,7 @@ namespace LibMpcTest
[DataRow("_My Playlist", 5)] [DataRow("_My Playlist", 5)]
public async Task ListPlaylistInfoTest(string playlistName, int numberOfFiles) public async Task ListPlaylistInfoTest(string playlistName, int numberOfFiles)
{ {
var response = await Mpc.SendAsync(new Commands.Playlists.Stored.ListPlaylistInfo(playlistName)); var response = await Mpc.SendAsync(new Commands.Commands.Playlists.Stored.ListPlaylistInfo(playlistName));
TestOutput.WriteLine($"ListPlaylistTest (playlistName: {playlistName}) Result:"); TestOutput.WriteLine($"ListPlaylistTest (playlistName: {playlistName}) Result:");
TestOutput.WriteLine(JsonConvert.SerializeObject(response, Formatting.Indented)); TestOutput.WriteLine(JsonConvert.SerializeObject(response, Formatting.Indented));
@ -42,7 +41,7 @@ namespace LibMpcTest
[TestMethod] [TestMethod]
public async Task ListPlaylistsTest() public async Task ListPlaylistsTest()
{ {
var response = await Mpc.SendAsync(new Commands.Playlists.Stored.ListPlaylists()); var response = await Mpc.SendAsync(new Commands.Commands.Playlists.Stored.ListPlaylists());
TestOutput.WriteLine($"ListPlaylistsTest Result:"); TestOutput.WriteLine($"ListPlaylistsTest Result:");
TestOutput.WriteLine(JsonConvert.SerializeObject(response, Formatting.Indented)); TestOutput.WriteLine(JsonConvert.SerializeObject(response, Formatting.Indented));

View File

@ -1,17 +1,16 @@
using System.Threading.Tasks;
using Newtonsoft.Json;
using LibMpc;
using System.Linq; using System.Linq;
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
using Newtonsoft.Json;
namespace LibMpcTest namespace MpcNET.Test
{ {
public partial class LibMpcTest public partial class LibMpcTest
{ {
[TestMethod] [TestMethod]
public async Task CommandsTest() public async Task CommandsTest()
{ {
var response = await Mpc.SendAsync(new Commands.Reflection.Commands()); var response = await Mpc.SendAsync(new Commands.Commands.Reflection.Commands());
TestOutput.WriteLine($"CommandsTest (commands: {response.Response.Body.Count()}) Result:"); TestOutput.WriteLine($"CommandsTest (commands: {response.Response.Body.Count()}) Result:");
TestOutput.WriteLine(JsonConvert.SerializeObject(response, Formatting.Indented)); TestOutput.WriteLine(JsonConvert.SerializeObject(response, Formatting.Indented));
@ -29,7 +28,7 @@ namespace LibMpcTest
[TestMethod] [TestMethod]
public async Task TagTypesTest() public async Task TagTypesTest()
{ {
var response = await Mpc.SendAsync(new Commands.Reflection.TagTypes()); var response = await Mpc.SendAsync(new Commands.Commands.Reflection.TagTypes());
TestOutput.WriteLine("TagTypesTest Result:"); TestOutput.WriteLine("TagTypesTest Result:");
TestOutput.WriteLine(JsonConvert.SerializeObject(response, Formatting.Indented)); TestOutput.WriteLine(JsonConvert.SerializeObject(response, Formatting.Indented));
@ -40,7 +39,7 @@ namespace LibMpcTest
[TestMethod] [TestMethod]
public async Task UrlHandlersTest() public async Task UrlHandlersTest()
{ {
var response = await Mpc.SendAsync(new Commands.Reflection.UrlHandlers()); var response = await Mpc.SendAsync(new Commands.Commands.Reflection.UrlHandlers());
TestOutput.WriteLine($"UrlHandlersTest (handlers: {response.Response.Body.Count()}) Result:"); TestOutput.WriteLine($"UrlHandlersTest (handlers: {response.Response.Body.Count()}) Result:");
TestOutput.WriteLine(JsonConvert.SerializeObject(response, Formatting.Indented)); TestOutput.WriteLine(JsonConvert.SerializeObject(response, Formatting.Indented));
@ -56,7 +55,7 @@ namespace LibMpcTest
[TestMethod] [TestMethod]
public async Task DecodersTest() public async Task DecodersTest()
{ {
var response = await Mpc.SendAsync(new Commands.Reflection.Decoders()); var response = await Mpc.SendAsync(new Commands.Commands.Reflection.Decoders());
TestOutput.WriteLine($"DecodersTest (decoders: {response.Response.Body.Count()}) Result:"); TestOutput.WriteLine($"DecodersTest (decoders: {response.Response.Body.Count()}) Result:");
TestOutput.WriteLine(JsonConvert.SerializeObject(response, Formatting.Indented)); TestOutput.WriteLine(JsonConvert.SerializeObject(response, Formatting.Indented));

View File

@ -8,9 +8,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Utilities", "Solut
.travis.yml = .travis.yml .travis.yml = .travis.yml
EndProjectSection EndProjectSection
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibMpc", "LibMpc\LibMpc.csproj", "{8994C820-7BA9-4BB8-B9EA-C608B07C4A11}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MpcNET", "MpcNET\MpcNET.csproj", "{8994C820-7BA9-4BB8-B9EA-C608B07C4A11}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LibMpcTest", "LibMpcTest\LibMpcTest.csproj", "{69F1D68F-9CD5-4EA6-9B47-2A7A9BF8CED9}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MpcNET.Test", "MpcNET.Test\MpcNET.Test.csproj", "{69F1D68F-9CD5-4EA6-9B47-2A7A9BF8CED9}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution

View File

@ -1,8 +1,9 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using LibMpc.Types; using MpcNET.Tags;
using MpcNET.Types;
namespace LibMpc namespace MpcNET.Commands
{ {
public partial class Commands public partial class Commands
{ {

View File

@ -1,7 +1,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using LibMpc.Types; using MpcNET.Types;
namespace LibMpc namespace MpcNET.Commands
{ {
public partial class Commands public partial class Commands
{ {

View File

@ -1,8 +1,8 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using LibMpc.Types; using MpcNET.Types;
namespace LibMpc namespace MpcNET.Commands
{ {
public partial class Commands public partial class Commands
{ {

View File

@ -1,8 +1,8 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using LibMpc.Types; using MpcNET.Types;
namespace LibMpc namespace MpcNET.Commands
{ {
public partial class Commands public partial class Commands
{ {

View File

@ -1,7 +1,6 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
namespace LibMpc namespace MpcNET.Commands
{ {
public interface IMpcCommand<out T> public interface IMpcCommand<out T>
{ {

View File

@ -1,7 +1,4 @@
using System.Collections.Generic; namespace MpcNET
using System.Threading.Tasks;
namespace LibMpc
{ {
public class Constants public class Constants
{ {

View File

@ -1,6 +1,6 @@
using System; using System;
namespace LibMpc namespace MpcNET
{ {
/// <summary> /// <summary>
/// Is thrown when a command is to be executed on a disconnected <see cref="MpcConnection"/> /// Is thrown when a command is to be executed on a disconnected <see cref="MpcConnection"/>

View File

@ -2,9 +2,10 @@ using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
using System.Linq; using System.Linq;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using MpcNET.Commands;
using Newtonsoft.Json; using Newtonsoft.Json;
namespace LibMpc namespace MpcNET.Message
{ {
public interface IMpdMessage<T> public interface IMpdMessage<T>
{ {

View File

@ -1,4 +1,6 @@
namespace LibMpc using MpcNET.Commands;
namespace MpcNET.Message
{ {
public interface IMpdRequest<T> public interface IMpdRequest<T>
{ {

View File

@ -1,7 +1,4 @@
using System; namespace MpcNET.Message
using System.Collections.Generic;
namespace LibMpc
{ {
public interface IMpdResponse<T> public interface IMpdResponse<T>
{ {
@ -20,15 +17,4 @@ namespace LibMpc
public IMpdResponseState State { get; } public IMpdResponseState State { get; }
public T Body { get; } public T Body { get; }
} }
public static class CheckNotNullExtension
{
public static void CheckNotNull(this object toBeChecked)
{
if (toBeChecked == null)
{
throw new ArgumentNullException(nameof(toBeChecked));
}
}
}
} }

View File

@ -1,6 +1,6 @@
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
namespace LibMpc namespace MpcNET.Message
{ {
public interface IMpdResponseState public interface IMpdResponseState
{ {

View File

@ -1,10 +1,11 @@
using System.Collections.Generic;
using System.Net; using System.Net;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using MpcNET.Commands;
using MpcNET.Message;
namespace LibMpc namespace MpcNET
{ {
/// <summary> /// <summary>
/// The Mpc class implements all commands for the MPD. It takes care of command building /// The Mpc class implements all commands for the MPD. It takes care of command building

View File

@ -4,10 +4,12 @@ using System.IO;
using System.Linq; using System.Linq;
using System.Net; using System.Net;
using System.Net.Sockets; using System.Net.Sockets;
using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using MpcNET.Commands;
using MpcNET.Message;
using MpcNET.Utils;
namespace LibMpc namespace MpcNET
{ {
/// <summary> /// <summary>
/// Keeps the connection to the MPD server and handels the most basic structure of the /// Keeps the connection to the MPD server and handels the most basic structure of the

View File

@ -2,13 +2,14 @@
<PropertyGroup> <PropertyGroup>
<TargetFramework>netstandard1.6</TargetFramework> <TargetFramework>netstandard1.6</TargetFramework>
<AssemblyName>LibMpc</AssemblyName> <AssemblyName>MpcNET</AssemblyName>
<PackageId>LibMpc</PackageId> <PackageId>MpcNET</PackageId>
<NetStandardImplicitPackageVersion>1.6.0</NetStandardImplicitPackageVersion> <NetStandardImplicitPackageVersion>1.6.0</NetStandardImplicitPackageVersion>
<PackageTargetFallback>$(PackageTargetFallback);dnxcore50</PackageTargetFallback> <PackageTargetFallback>$(PackageTargetFallback);dnxcore50</PackageTargetFallback>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute> <GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute> <GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute> <GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<RootNamespace>MpcNET</RootNamespace>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@ -1,9 +1,9 @@
using System; using System;
using System.Collections.ObjectModel;
using System.Collections.Generic; using System.Collections.Generic;
using LibMpc.Types; using System.Collections.ObjectModel;
using MpcNET.Types;
namespace LibMpc namespace MpcNET
{ {
/// <summary> /// <summary>
/// The MpdDirectoryListing class contains the response of a MPD server to a list command. /// The MpdDirectoryListing class contains the response of a MPD server to a list command.

View File

@ -1,6 +1,6 @@
using System.Text; using System.Text;
namespace LibMpc namespace MpcNET
{ {
/// <summary> /// <summary>
/// The MpdStatistics class contains statistics of the MPD file database. /// The MpdStatistics class contains statistics of the MPD file database.

View File

@ -1,6 +1,6 @@
using System.Text; using System.Text;
namespace LibMpc namespace MpcNET
{ {
/// <summary> /// <summary>
/// The possible states of the MPD. /// The possible states of the MPD.

View File

@ -7,7 +7,7 @@ using System.Runtime.InteropServices;
// associated with an assembly. // associated with an assembly.
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")] [assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("LibMpc")] [assembly: AssemblyProduct("MpcNET")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]
// Setting ComVisible to false makes the types in this assembly not visible // Setting ComVisible to false makes the types in this assembly not visible

View File

@ -1,4 +1,4 @@
namespace LibMpc namespace MpcNET.Tags
{ {
/// <summary> /// <summary>
/// https://www.musicpd.org/doc/protocol/database.html : find {TYPE} {WHAT} [...] [window START:END] /// https://www.musicpd.org/doc/protocol/database.html : find {TYPE} {WHAT} [...] [window START:END]

View File

@ -1,4 +1,4 @@
namespace LibMpc namespace MpcNET.Tags
{ {
/// <summary> /// <summary>
/// https://www.musicpd.org/doc/protocol/tags.html /// https://www.musicpd.org/doc/protocol/tags.html

View File

@ -1,4 +1,4 @@
namespace LibMpc namespace MpcNET.Tags
{ {
public interface ITag public interface ITag
{ {

View File

@ -1,6 +1,6 @@
using System.Collections.Generic; using System.Collections.Generic;
namespace LibMpc.Types namespace MpcNET.Types
{ {
public interface IMpdFilePath public interface IMpdFilePath
{ {

View File

@ -1,6 +1,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using MpcNET.Utils;
namespace LibMpc.Types namespace MpcNET.Types
{ {
public class MpdDecoderPlugin public class MpdDecoderPlugin
{ {

View File

@ -1,7 +1,8 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using MpcNET.Utils;
namespace LibMpc.Types namespace MpcNET.Types
{ {
public class MpdDirectory public class MpdDirectory
{ {

View File

@ -1,6 +1,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using MpcNET.Utils;
namespace LibMpc.Types namespace MpcNET.Types
{ {
/// <summary> /// <summary>
/// The MpdFile class contains all meta data for a file of the MPD. /// The MpdFile class contains all meta data for a file of the MPD.

View File

@ -1,4 +1,6 @@
namespace LibMpc.Types using MpcNET.Utils;
namespace MpcNET.Types
{ {
/// <summary> /// <summary>
/// The MpdOutput class contains all attributes of an output device of the MPD. /// The MpdOutput class contains all attributes of an output device of the MPD.

View File

@ -1,7 +1,8 @@
using System; using System;
using System.Globalization; using System.Globalization;
using MpcNET.Utils;
namespace LibMpc.Types namespace MpcNET.Types
{ {
public class MpdPlaylist public class MpdPlaylist
{ {

View File

@ -0,0 +1,15 @@
using System;
namespace MpcNET.Utils
{
public static class CheckNotNullExtension
{
public static void CheckNotNull(this object toBeChecked)
{
if (toBeChecked == null)
{
throw new ArgumentNullException(nameof(toBeChecked));
}
}
}
}