mirror of
https://github.com/ZetaKebab/MpcNET.git
synced 2025-01-14 22:18:43 +00:00
Major refactoring
This commit is contained in:
parent
245efd6477
commit
12ddc4bca4
2
.gitignore
vendored
2
.gitignore
vendored
@ -20,3 +20,5 @@
|
|||||||
/Sources/MpcNET/bin/Debug/netstandard2.0
|
/Sources/MpcNET/bin/Debug/netstandard2.0
|
||||||
/Sources/MpcNET/obj
|
/Sources/MpcNET/obj
|
||||||
/Sources/MpcNET.Test/obj
|
/Sources/MpcNET.Test/obj
|
||||||
|
/Sources/MpcNET/bin
|
||||||
|
/Sources/MpcNET.Test/bin/Debug/netcoreapp2.0
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
using System.Collections.Generic;
|
namespace MpcNET.Test
|
||||||
using System.Linq;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|
||||||
|
|
||||||
namespace MpcNET.Test
|
|
||||||
{
|
{
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
|
|
||||||
[TestClass]
|
[TestClass]
|
||||||
public partial class LibMpcTest
|
public partial class LibMpcTest
|
||||||
{
|
{
|
||||||
@ -25,29 +25,34 @@ namespace MpcNET.Test
|
|||||||
_mpdMock.Dispose();
|
_mpdMock.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static Mpc Mpc { get; private set; }
|
internal static MpcConnection Mpc { get; private set; }
|
||||||
|
|
||||||
private static async Task SendCommand(string command)
|
private static async Task SendCommand(string command)
|
||||||
{
|
{
|
||||||
var response = await Mpc.SendAsync(new PassthroughCommand(command));
|
var response = await Mpc.SendAsync(_ => new PassthroughCommand(command));
|
||||||
TestOutput.WriteLine(response);
|
TestOutput.WriteLine(response);
|
||||||
}
|
}
|
||||||
private static async Task SendCommand<T>(IMpcCommand<T> command)
|
private static async Task SendCommand<T>(IMpcCommand<T> command)
|
||||||
{
|
{
|
||||||
var response = await Mpc.SendAsync(command);
|
var response = await Mpc.SendAsync(_ => command);
|
||||||
TestOutput.WriteLine(response);
|
TestOutput.WriteLine(response);
|
||||||
}
|
}
|
||||||
|
|
||||||
private class PassthroughCommand : IMpcCommand<IList<string>>
|
private class PassthroughCommand : IMpcCommand<IList<string>>
|
||||||
{
|
{
|
||||||
|
private readonly string command;
|
||||||
|
|
||||||
public PassthroughCommand(string command)
|
public PassthroughCommand(string command)
|
||||||
{
|
{
|
||||||
Value = command;
|
this.command = command;
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Value { get; }
|
public string Serialize()
|
||||||
|
{
|
||||||
|
return this.command;
|
||||||
|
}
|
||||||
|
|
||||||
public IList<string> FormatResponse(IList<KeyValuePair<string, string>> response)
|
public IList<string> Deserialize(IReadOnlyList<KeyValuePair<string, string>> response)
|
||||||
{
|
{
|
||||||
var result = response.Select(atrb => $"{atrb.Key}: {atrb.Value}").ToList();
|
var result = response.Select(atrb => $"{atrb.Key}: {atrb.Value}").ToList();
|
||||||
return result;
|
return result;
|
||||||
|
@ -1,25 +1,25 @@
|
|||||||
using System;
|
|
||||||
using System.Net;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace MpcNET.Test
|
namespace MpcNET.Test
|
||||||
{
|
{
|
||||||
|
using System;
|
||||||
|
using System.Net;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
public class MpcMock : IDisposable
|
public class MpcMock : IDisposable
|
||||||
{
|
{
|
||||||
public MpcMock()
|
public MpcMock()
|
||||||
{
|
{
|
||||||
var mpdEndpoint = new IPEndPoint(IPAddress.Loopback, 6600);
|
var mpdEndpoint = new IPEndPoint(IPAddress.Loopback, 6600);
|
||||||
Client = new Mpc(mpdEndpoint);
|
this.Client = new MpcConnection(mpdEndpoint);
|
||||||
|
|
||||||
var connected = Task.Run(async () => await Client.ConnectAsync()).Result;
|
Task.Run(async () => await this.Client.ConnectAsync()).Wait();
|
||||||
TestOutput.WriteLine($"Connected to MPD : {connected}; Version: {Client.Version}");
|
TestOutput.WriteLine($"Connected to MPD Version: {this.Client.Version}");
|
||||||
}
|
}
|
||||||
|
|
||||||
public Mpc Client { get; }
|
public MpcConnection Client { get; }
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
Client?.DisconnectAsync().GetAwaiter().GetResult();
|
this.Client?.DisconnectAsync().GetAwaiter().GetResult();
|
||||||
TestOutput.WriteLine($"Disconnected from MPD.");
|
TestOutput.WriteLine($"Disconnected from MPD.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -24,9 +24,9 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.5.0" />
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.7.2" />
|
||||||
<PackageReference Include="MSTest.TestAdapter" Version="1.2.0" />
|
<PackageReference Include="MSTest.TestAdapter" Version="1.3.0" />
|
||||||
<PackageReference Include="MSTest.TestFramework" Version="1.2.0" />
|
<PackageReference Include="MSTest.TestFramework" Version="1.3.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
using System.IO;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace MpcNET.Test
|
namespace MpcNET.Test
|
||||||
{
|
{
|
||||||
|
using System.IO;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
public class MpdConf
|
public class MpdConf
|
||||||
{
|
{
|
||||||
private const string MPD_CONF_FILE = "mpd.conf";
|
private const string MPD_CONF_FILE = "mpd.conf";
|
||||||
|
@ -1,24 +1,24 @@
|
|||||||
using System;
|
|
||||||
using System.Diagnostics;
|
|
||||||
using System.IO;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
namespace MpcNET.Test
|
namespace MpcNET.Test
|
||||||
{
|
{
|
||||||
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.IO;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
public class MpdMock : IDisposable
|
public class MpdMock : IDisposable
|
||||||
{
|
{
|
||||||
public void Start()
|
public void Start()
|
||||||
{
|
{
|
||||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
|
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
|
||||||
{
|
{
|
||||||
SendCommand("/usr/bin/pkill mpd");
|
this.SendCommand("/usr/bin/pkill mpd");
|
||||||
}
|
}
|
||||||
|
|
||||||
MpdConf.Create(Path.Combine(AppContext.BaseDirectory, "Server"));
|
MpdConf.Create(Path.Combine(AppContext.BaseDirectory, "Server"));
|
||||||
|
|
||||||
var server = GetServer();
|
var server = this.GetServer();
|
||||||
|
|
||||||
Process = new Process
|
this.Process = new Process
|
||||||
{
|
{
|
||||||
StartInfo = new ProcessStartInfo
|
StartInfo = new ProcessStartInfo
|
||||||
{
|
{
|
||||||
@ -32,15 +32,15 @@ namespace MpcNET.Test
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
TestOutput.WriteLine($"Starting Server: {Process.StartInfo.FileName} {Process.StartInfo.Arguments}");
|
TestOutput.WriteLine($"Starting Server: {this.Process.StartInfo.FileName} {this.Process.StartInfo.Arguments}");
|
||||||
|
|
||||||
Process.Start();
|
this.Process.Start();
|
||||||
TestOutput.WriteLine($"Output: {Process.StandardOutput.ReadToEnd()}");
|
TestOutput.WriteLine($"Output: {this.Process.StandardOutput.ReadToEnd()}");
|
||||||
TestOutput.WriteLine($"Error: {Process.StandardError.ReadToEnd()}");
|
TestOutput.WriteLine($"Error: {this.Process.StandardError.ReadToEnd()}");
|
||||||
|
|
||||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
|
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
|
||||||
{
|
{
|
||||||
SendCommand("/bin/netstat -ntpl");
|
this.SendCommand("/bin/netstat -ntpl");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -87,8 +87,8 @@ namespace MpcNET.Test
|
|||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
Process?.Kill();
|
this.Process?.Kill();
|
||||||
Process?.Dispose();
|
this.Process?.Dispose();
|
||||||
TestOutput.WriteLine("Server Stopped.");
|
TestOutput.WriteLine("Server Stopped.");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -106,9 +106,9 @@ namespace MpcNET.Test
|
|||||||
|
|
||||||
private Server(string fileName, string workingDirectory, string arguments)
|
private Server(string fileName, string workingDirectory, string arguments)
|
||||||
{
|
{
|
||||||
FileName = fileName;
|
this.FileName = fileName;
|
||||||
WorkingDirectory = workingDirectory;
|
this.WorkingDirectory = workingDirectory;
|
||||||
Arguments = arguments;
|
this.Arguments = arguments;
|
||||||
}
|
}
|
||||||
|
|
||||||
public string FileName { get; }
|
public string FileName { get; }
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
using System;
|
namespace MpcNET.Test
|
||||||
using MpcNET.Message;
|
|
||||||
|
|
||||||
namespace MpcNET.Test
|
|
||||||
{
|
{
|
||||||
|
using System;
|
||||||
|
using MpcNET.Message;
|
||||||
|
|
||||||
internal static class TestOutput
|
internal static class TestOutput
|
||||||
{
|
{
|
||||||
internal static void WriteLine(string value)
|
internal static void WriteLine(string value)
|
||||||
|
@ -1,33 +1,33 @@
|
|||||||
using System.Linq;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|
||||||
using MpcNET.Commands;
|
|
||||||
using MpcNET.Tags;
|
|
||||||
|
|
||||||
namespace MpcNET.Test
|
namespace MpcNET.Test
|
||||||
{
|
{
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
|
using MpcNET.Commands;
|
||||||
|
using MpcNET.Tags;
|
||||||
|
|
||||||
public partial class LibMpcTest
|
public partial class LibMpcTest
|
||||||
{
|
{
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public async Task ListAllTest()
|
public async Task ListAllTest()
|
||||||
{
|
{
|
||||||
var response = await Mpc.SendAsync(Command.Database.ListAll());
|
var response = await Mpc.SendAsync(commands => commands.Database.ListAll());
|
||||||
|
|
||||||
TestOutput.WriteLine("ListAllTest Result:");
|
TestOutput.WriteLine("ListAllTest Result:");
|
||||||
TestOutput.WriteLine(response);
|
TestOutput.WriteLine(response);
|
||||||
|
|
||||||
Assert.IsTrue(response.Response.Body.Count().Equals(7));
|
Assert.IsTrue(response.Response.Content.Count().Equals(7));
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public async Task FindGenreTest()
|
public async Task FindGenreTest()
|
||||||
{
|
{
|
||||||
var response = await Mpc.SendAsync(Command.Database.Find(MpdTags.Genre, "soundfx"));
|
var response = await Mpc.SendAsync(commands => commands.Database.Find(MpdTags.Genre, "soundfx"));
|
||||||
|
|
||||||
TestOutput.WriteLine("FindGenreTest Result:");
|
TestOutput.WriteLine("FindGenreTest Result:");
|
||||||
TestOutput.WriteLine(response);
|
TestOutput.WriteLine(response);
|
||||||
|
|
||||||
Assert.IsTrue(response.Response.Body.Count().Equals(7));
|
Assert.IsTrue(response.Response.Content.Count().Equals(7));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,16 +1,16 @@
|
|||||||
using MpcNET.Message;
|
|
||||||
|
|
||||||
namespace MpcNET.Test
|
namespace MpcNET.Test
|
||||||
{
|
{
|
||||||
|
using MpcNET.Message;
|
||||||
|
|
||||||
public static class MpdMessageExtension
|
public static class MpdMessageExtension
|
||||||
{
|
{
|
||||||
public static bool HasSuccessResponse<T>(this IMpdMessage<T> message)
|
public static bool HasSuccessResponse<T>(this IMpdMessage<T> message)
|
||||||
{
|
{
|
||||||
return message.Response.State.Connected &&
|
return message.Response.Result.Connected &&
|
||||||
message.Response.State.Status == "OK" &&
|
message.Response.Result.Status == "OK" &&
|
||||||
!message.Response.State.Error &&
|
!message.Response.Result.Error &&
|
||||||
message.Response.State.ErrorMessage == string.Empty &&
|
message.Response.Result.ErrorMessage == string.Empty &&
|
||||||
message.Response.State.MpdError == string.Empty;
|
message.Response.Result.MpdError == string.Empty;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,76 +1,75 @@
|
|||||||
using System.Linq;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|
||||||
using MpcNET.Commands;
|
|
||||||
|
|
||||||
namespace MpcNET.Test
|
namespace MpcNET.Test
|
||||||
{
|
{
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
|
|
||||||
public partial class LibMpcTest
|
public partial class LibMpcTest
|
||||||
{
|
{
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public async Task DisableOutputTest()
|
public async Task DisableOutputTest()
|
||||||
{
|
{
|
||||||
var responseOutputs = await Mpc.SendAsync(Command.Output.Outputs());
|
var responseOutputs = await Mpc.SendAsync(commands => commands.Output.Outputs());
|
||||||
Assert.IsTrue(responseOutputs.Response.Body.Single(output => output.Id.Equals(0)).IsEnabled);
|
Assert.IsTrue(responseOutputs.Response.Content.Single(output => output.Id.Equals(0)).IsEnabled);
|
||||||
|
|
||||||
var response = await Mpc.SendAsync(Command.Output.DisableOutput(0));
|
var response = await Mpc.SendAsync(commands => commands.Output.DisableOutput(0));
|
||||||
|
|
||||||
TestOutput.WriteLine("DisableOutputTest Result:");
|
TestOutput.WriteLine("DisableOutputTest Result:");
|
||||||
TestOutput.WriteLine(response);
|
TestOutput.WriteLine(response);
|
||||||
|
|
||||||
Assert.IsTrue(response.Response.Body.Equals(string.Empty));
|
Assert.IsTrue(response.Response.Content.Equals(string.Empty));
|
||||||
Assert.IsTrue(response.Response.State.Status.Equals("OK"));
|
Assert.IsTrue(response.Response.Result.Status.Equals("OK"));
|
||||||
|
|
||||||
responseOutputs = await Mpc.SendAsync(Command.Output.Outputs());
|
responseOutputs = await Mpc.SendAsync(c => c.Output.Outputs());
|
||||||
Assert.IsFalse(responseOutputs.Response.Body.Single(output => output.Id.Equals(0)).IsEnabled);
|
Assert.IsFalse(responseOutputs.Response.Content.Single(output => output.Id.Equals(0)).IsEnabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public async Task EnableOutputTest()
|
public async Task EnableOutputTest()
|
||||||
{
|
{
|
||||||
var responseOutputs = await Mpc.SendAsync(Command.Output.Outputs());
|
var responseOutputs = await Mpc.SendAsync(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.Content.Single(output => output.Id.Equals(1)).IsEnabled);
|
||||||
|
|
||||||
var response = await Mpc.SendAsync(Command.Output.EnableOutput(1));
|
var response = await Mpc.SendAsync(commands => commands.Output.EnableOutput(1));
|
||||||
|
|
||||||
TestOutput.WriteLine("EnableOutputTest Result:");
|
TestOutput.WriteLine("EnableOutputTest Result:");
|
||||||
TestOutput.WriteLine(response);
|
TestOutput.WriteLine(response);
|
||||||
|
|
||||||
Assert.IsTrue(response.Response.Body.Equals(string.Empty));
|
Assert.IsTrue(response.Response.Content.Equals(string.Empty));
|
||||||
Assert.IsTrue(response.Response.State.Status.Equals("OK"));
|
Assert.IsTrue(response.Response.Result.Status.Equals("OK"));
|
||||||
|
|
||||||
responseOutputs = await Mpc.SendAsync(Command.Output.Outputs());
|
responseOutputs = await Mpc.SendAsync(commands => commands.Output.Outputs());
|
||||||
Assert.IsTrue(responseOutputs.Response.Body.Single(output => output.Id.Equals(1)).IsEnabled);
|
Assert.IsTrue(responseOutputs.Response.Content.Single(output => output.Id.Equals(1)).IsEnabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public async Task ToggleOutputTest()
|
public async Task ToggleOutputTest()
|
||||||
{
|
{
|
||||||
var responseOutputs = await Mpc.SendAsync(Command.Output.Outputs());
|
var responseOutputs = await Mpc.SendAsync(commands => commands.Output.Outputs());
|
||||||
Assert.IsTrue(responseOutputs.Response.Body.Single(output => output.Id.Equals(2)).IsEnabled);
|
Assert.IsTrue(responseOutputs.Response.Content.Single(output => output.Id.Equals(2)).IsEnabled);
|
||||||
|
|
||||||
var response = await Mpc.SendAsync(Command.Output.ToggleOutput(2));
|
var response = await Mpc.SendAsync(commands => commands.Output.ToggleOutput(2));
|
||||||
|
|
||||||
TestOutput.WriteLine("ToggleOutputTest Result:");
|
TestOutput.WriteLine("ToggleOutputTest Result:");
|
||||||
TestOutput.WriteLine(response);
|
TestOutput.WriteLine(response);
|
||||||
|
|
||||||
Assert.IsTrue(response.Response.Body.Equals(string.Empty));
|
Assert.IsTrue(response.Response.Content.Equals(string.Empty));
|
||||||
Assert.IsTrue(response.Response.State.Status.Equals("OK"));
|
Assert.IsTrue(response.Response.Result.Status.Equals("OK"));
|
||||||
|
|
||||||
responseOutputs = await Mpc.SendAsync(Command.Output.Outputs());
|
responseOutputs = await Mpc.SendAsync(commands => commands.Output.Outputs());
|
||||||
Assert.IsFalse(responseOutputs.Response.Body.Single(output => output.Id.Equals(2)).IsEnabled);
|
Assert.IsFalse(responseOutputs.Response.Content.Single(output => output.Id.Equals(2)).IsEnabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public async Task LisOutputsTest()
|
public async Task LisOutputsTest()
|
||||||
{
|
{
|
||||||
var response = await Mpc.SendAsync(Command.Output.Outputs());
|
var response = await Mpc.SendAsync(commands => commands.Output.Outputs());
|
||||||
|
|
||||||
TestOutput.WriteLine("LisOutputsTest Result:");
|
TestOutput.WriteLine("LisOutputsTest Result:");
|
||||||
TestOutput.WriteLine(response);
|
TestOutput.WriteLine(response);
|
||||||
|
|
||||||
Assert.IsTrue(response.Response.Body.Count().Equals(3));
|
Assert.IsTrue(response.Response.Content.Count().Equals(3));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,10 +1,10 @@
|
|||||||
using System.Linq;
|
namespace MpcNET.Test
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|
||||||
using MpcNET.Commands;
|
|
||||||
|
|
||||||
namespace MpcNET.Test
|
|
||||||
{
|
{
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
|
using MpcNET.Commands;
|
||||||
|
|
||||||
public partial class LibMpcTest
|
public partial class LibMpcTest
|
||||||
{
|
{
|
||||||
[DataTestMethod]
|
[DataTestMethod]
|
||||||
@ -13,12 +13,12 @@ namespace MpcNET.Test
|
|||||||
[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(Command.Playlists.Stored.GetContent(playlistName));
|
var response = await Mpc.SendAsync(commands => commands.StoredPlaylist.GetContent(playlistName));
|
||||||
|
|
||||||
TestOutput.WriteLine($"ListPlaylistTest (playlistName: {playlistName}) Result:");
|
TestOutput.WriteLine($"ListPlaylistTest (playlistName: {playlistName}) Result:");
|
||||||
TestOutput.WriteLine(response);
|
TestOutput.WriteLine(response);
|
||||||
|
|
||||||
Assert.IsTrue(response.Response.Body.Count().Equals(numberOfFiles));
|
Assert.IsTrue(response.Response.Content.Count().Equals(numberOfFiles));
|
||||||
}
|
}
|
||||||
|
|
||||||
[DataTestMethod]
|
[DataTestMethod]
|
||||||
@ -27,26 +27,26 @@ namespace MpcNET.Test
|
|||||||
[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(Command.Playlists.Stored.GetContentWithMetadata(playlistName));
|
var response = await Mpc.SendAsync(commands => commands.StoredPlaylist.GetContentWithMetadata(playlistName));
|
||||||
|
|
||||||
TestOutput.WriteLine($"ListPlaylistTest (playlistName: {playlistName}) Result:");
|
TestOutput.WriteLine($"ListPlaylistTest (playlistName: {playlistName}) Result:");
|
||||||
TestOutput.WriteLine(response);
|
TestOutput.WriteLine(response);
|
||||||
|
|
||||||
Assert.IsTrue(response.Response.Body.Count().Equals(numberOfFiles));
|
Assert.IsTrue(response.Response.Content.Count().Equals(numberOfFiles));
|
||||||
Assert.IsTrue(response.Response.Body.All(item => !string.IsNullOrEmpty(item.Artist)));
|
Assert.IsTrue(response.Response.Content.All(item => !string.IsNullOrEmpty(item.Artist)));
|
||||||
Assert.IsTrue(response.Response.Body.All(item => !string.IsNullOrEmpty(item.Title)));
|
Assert.IsTrue(response.Response.Content.All(item => !string.IsNullOrEmpty(item.Title)));
|
||||||
Assert.IsTrue(response.Response.Body.All(item => !string.IsNullOrEmpty(item.Date)));
|
Assert.IsTrue(response.Response.Content.All(item => !string.IsNullOrEmpty(item.Date)));
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public async Task ListPlaylistsTest()
|
public async Task ListPlaylistsTest()
|
||||||
{
|
{
|
||||||
var response = await Mpc.SendAsync(Command.Playlists.Stored.GetAll());
|
var response = await Mpc.SendAsync(commands => commands.StoredPlaylist.GetAll());
|
||||||
|
|
||||||
TestOutput.WriteLine($"ListPlaylistsTest Result:");
|
TestOutput.WriteLine($"ListPlaylistsTest Result:");
|
||||||
TestOutput.WriteLine(response);
|
TestOutput.WriteLine(response);
|
||||||
|
|
||||||
Assert.IsTrue(response.Response.Body.Count().Equals(3));
|
Assert.IsTrue(response.Response.Content.Count().Equals(3));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -55,120 +55,120 @@ namespace MpcNET.Test
|
|||||||
[TestMethod]
|
[TestMethod]
|
||||||
public async Task QueueTests()
|
public async Task QueueTests()
|
||||||
{
|
{
|
||||||
await LoadPlaylistTest();
|
await this.LoadPlaylistTest();
|
||||||
await ClearPlaylistTest();
|
await this.ClearPlaylistTest();
|
||||||
await AddDirectoryTest();
|
await this.AddDirectoryTest();
|
||||||
await AddFileTest();
|
await this.AddFileTest();
|
||||||
await RemovePositionTest();
|
await this.RemovePositionTest();
|
||||||
await RemoveIdTest();
|
await this.RemoveIdTest();
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task LoadPlaylistTest()
|
public async Task LoadPlaylistTest()
|
||||||
{
|
{
|
||||||
await Clear_Queue();
|
await this.Clear_Queue();
|
||||||
await Check_Empty_Queue();
|
await this.Check_Empty_Queue();
|
||||||
await Load_Playlist("Playlist One");
|
await this.Load_Playlist("Playlist One");
|
||||||
await Check_Queue_HasSongs(5);
|
await this.Check_Queue_HasSongs(5);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task ClearPlaylistTest()
|
public async Task ClearPlaylistTest()
|
||||||
{
|
{
|
||||||
await Clear_Queue();
|
await this.Clear_Queue();
|
||||||
await Check_Empty_Queue();
|
await this.Check_Empty_Queue();
|
||||||
await Load_Playlist("Playlist One");
|
await this.Load_Playlist("Playlist One");
|
||||||
await Clear_Queue();
|
await this.Clear_Queue();
|
||||||
await Check_Queue_HasSongs(0);
|
await this.Check_Queue_HasSongs(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task AddDirectoryTest()
|
public async Task AddDirectoryTest()
|
||||||
{
|
{
|
||||||
await Clear_Queue();
|
await this.Clear_Queue();
|
||||||
await Check_Empty_Queue();
|
await this.Check_Empty_Queue();
|
||||||
await Add_Directory("Directory With Spaces");
|
await this.Add_Directory("Directory With Spaces");
|
||||||
await Check_Queue_HasSongs(3);
|
await this.Check_Queue_HasSongs(3);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task AddFileTest()
|
public async Task AddFileTest()
|
||||||
{
|
{
|
||||||
await Clear_Queue();
|
await this.Clear_Queue();
|
||||||
await Check_Empty_Queue();
|
await this.Check_Empty_Queue();
|
||||||
await Add_File("teaspoon-stirring-mug-of-coffee.mp3");
|
await this.Add_File("teaspoon-stirring-mug-of-coffee.mp3");
|
||||||
await Check_Queue_HasSongs(1);
|
await this.Check_Queue_HasSongs(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task RemovePositionTest()
|
public async Task RemovePositionTest()
|
||||||
{
|
{
|
||||||
await Clear_Queue();
|
await this.Clear_Queue();
|
||||||
await Check_Empty_Queue();
|
await this.Check_Empty_Queue();
|
||||||
await Add_File("teaspoon-stirring-mug-of-coffee.mp3");
|
await this.Add_File("teaspoon-stirring-mug-of-coffee.mp3");
|
||||||
await Remove_Position(0);
|
await this.Remove_Position(0);
|
||||||
await Check_Queue_HasSongs(0);
|
await this.Check_Queue_HasSongs(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task RemoveIdTest()
|
public async Task RemoveIdTest()
|
||||||
{
|
{
|
||||||
await Clear_Queue();
|
await this.Clear_Queue();
|
||||||
await Check_Empty_Queue();
|
await this.Check_Empty_Queue();
|
||||||
await Add_File("teaspoon-stirring-mug-of-coffee.mp3");
|
await this.Add_File("teaspoon-stirring-mug-of-coffee.mp3");
|
||||||
var id = await Get_Song_Id();
|
var id = await this.Get_Song_Id();
|
||||||
await Remove_Id(id);
|
await this.Remove_Id(id);
|
||||||
await Check_Queue_HasSongs(0);
|
await this.Check_Queue_HasSongs(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task Check_Empty_Queue()
|
private async Task Check_Empty_Queue()
|
||||||
{
|
{
|
||||||
var message = await Mpc.SendAsync(Command.Playlists.Current.GetAllSongsInfo());
|
var message = await Mpc.SendAsync(commands => commands.CurrentPlaylist.GetAllSongsInfo());
|
||||||
Assert.IsTrue(message.HasSuccessResponse());
|
Assert.IsTrue(message.HasSuccessResponse());
|
||||||
Assert.IsFalse(message.Response.Body.Any());
|
Assert.IsFalse(message.Response.Content.Any());
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task Load_Playlist(string playlistName)
|
private async Task Load_Playlist(string playlistName)
|
||||||
{
|
{
|
||||||
var message = await Mpc.SendAsync(Command.Playlists.Stored.Load(playlistName));
|
var message = await Mpc.SendAsync(commands => commands.StoredPlaylist.Load(playlistName));
|
||||||
Assert.IsTrue(message.HasSuccessResponse());
|
Assert.IsTrue(message.HasSuccessResponse());
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task Clear_Queue()
|
private async Task Clear_Queue()
|
||||||
{
|
{
|
||||||
var message = await Mpc.SendAsync(Command.Playlists.Current.Clear());
|
var message = await Mpc.SendAsync(commands => commands.CurrentPlaylist.Clear());
|
||||||
Assert.IsTrue(message.HasSuccessResponse());
|
Assert.IsTrue(message.HasSuccessResponse());
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task Check_Queue_HasSongs(int nrOfSongs)
|
private async Task Check_Queue_HasSongs(int nrOfSongs)
|
||||||
{
|
{
|
||||||
var message = await Mpc.SendAsync(Command.Playlists.Current.GetAllSongsInfo());
|
var message = await Mpc.SendAsync(commands => commands.CurrentPlaylist.GetAllSongsInfo());
|
||||||
Assert.IsTrue(message.HasSuccessResponse());
|
Assert.IsTrue(message.HasSuccessResponse());
|
||||||
Assert.IsTrue(message.Response.Body.Count() == nrOfSongs);
|
Assert.IsTrue(message.Response.Content.Count() == nrOfSongs);
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task Add_Directory(string directory)
|
private async Task Add_Directory(string directory)
|
||||||
{
|
{
|
||||||
var message = await Mpc.SendAsync(Command.Playlists.Current.AddDirectory(directory));
|
var message = await Mpc.SendAsync(commands => commands.CurrentPlaylist.AddDirectory(directory));
|
||||||
Assert.IsTrue(message.HasSuccessResponse());
|
Assert.IsTrue(message.HasSuccessResponse());
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task Add_File(string file)
|
private async Task Add_File(string file)
|
||||||
{
|
{
|
||||||
var message = await Mpc.SendAsync(Command.Playlists.Current.AddSong(file));
|
var message = await Mpc.SendAsync(commands => commands.CurrentPlaylist.AddSong(file));
|
||||||
Assert.IsTrue(message.HasSuccessResponse());
|
Assert.IsTrue(message.HasSuccessResponse());
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task Remove_Position(int position)
|
private async Task Remove_Position(int position)
|
||||||
{
|
{
|
||||||
var message = await Mpc.SendAsync(Command.Playlists.Current.RemoveSongByPosition(position));
|
var message = await Mpc.SendAsync(commands => commands.CurrentPlaylist.RemoveSongByPosition(position));
|
||||||
Assert.IsTrue(message.HasSuccessResponse());
|
Assert.IsTrue(message.HasSuccessResponse());
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task Remove_Id(int songId)
|
private async Task Remove_Id(int songId)
|
||||||
{
|
{
|
||||||
var message = await Mpc.SendAsync(Command.Playlists.Current.RemoveSongById(songId));
|
var message = await Mpc.SendAsync(commands => commands.CurrentPlaylist.RemoveSongById(songId));
|
||||||
Assert.IsTrue(message.HasSuccessResponse());
|
Assert.IsTrue(message.HasSuccessResponse());
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task<int> Get_Song_Id()
|
private async Task<int> Get_Song_Id()
|
||||||
{
|
{
|
||||||
var message = await Mpc.SendAsync(Command.Playlists.Current.GetAllSongMetadata());
|
var message = await Mpc.SendAsync(commands => commands.CurrentPlaylist.GetAllSongMetadata());
|
||||||
return message.Response.Body.Single().Id;
|
return message.Response.Content.Single().Id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,79 +1,79 @@
|
|||||||
using System.Linq;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|
||||||
using MpcNET.Commands;
|
|
||||||
|
|
||||||
namespace MpcNET.Test
|
namespace MpcNET.Test
|
||||||
{
|
{
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
|
using MpcNET.Commands;
|
||||||
|
|
||||||
public partial class LibMpcTest
|
public partial class LibMpcTest
|
||||||
{
|
{
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public async Task CommandsTest()
|
public async Task CommandsTest()
|
||||||
{
|
{
|
||||||
var response = await Mpc.SendAsync(Command.Reflection.Commands());
|
var response = await Mpc.SendAsync(commands => commands.Reflection.Commands());
|
||||||
|
|
||||||
TestOutput.WriteLine($"CommandsTest (commands: {response.Response.Body.Count()}) Result:");
|
TestOutput.WriteLine($"CommandsTest (commands: {response.Response.Content.Count()}) Result:");
|
||||||
TestOutput.WriteLine(response);
|
TestOutput.WriteLine(response);
|
||||||
|
|
||||||
// Different answer from MPD on Windows and on Linux, beacuse of Version.
|
// Different answer from MPD on Windows and on Linux, beacuse of Version.
|
||||||
// Check some of the commands.
|
// Check some of the commands.
|
||||||
Assert.IsTrue(response.Response.Body.Any(command => command.Equals("listall")));
|
Assert.IsTrue(response.Response.Content.Any(command => command.Equals("listall")));
|
||||||
Assert.IsTrue(response.Response.Body.Any(command => command.Equals("outputs")));
|
Assert.IsTrue(response.Response.Content.Any(command => command.Equals("outputs")));
|
||||||
Assert.IsTrue(response.Response.Body.Any(command => command.Equals("pause")));
|
Assert.IsTrue(response.Response.Content.Any(command => command.Equals("pause")));
|
||||||
Assert.IsTrue(response.Response.Body.Any(command => command.Equals("play")));
|
Assert.IsTrue(response.Response.Content.Any(command => command.Equals("play")));
|
||||||
Assert.IsTrue(response.Response.Body.Any(command => command.Equals("setvol")));
|
Assert.IsTrue(response.Response.Content.Any(command => command.Equals("setvol")));
|
||||||
Assert.IsTrue(response.Response.Body.Any(command => command.Equals("stop")));
|
Assert.IsTrue(response.Response.Content.Any(command => command.Equals("stop")));
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public async Task TagTypesTest()
|
public async Task TagTypesTest()
|
||||||
{
|
{
|
||||||
var response = await Mpc.SendAsync(Command.Reflection.TagTypes());
|
var response = await Mpc.SendAsync(commands => commands.Reflection.TagTypes());
|
||||||
|
|
||||||
TestOutput.WriteLine("TagTypesTest Result:");
|
TestOutput.WriteLine("TagTypesTest Result:");
|
||||||
TestOutput.WriteLine(response);
|
TestOutput.WriteLine(response);
|
||||||
|
|
||||||
Assert.IsTrue(response.Response.Body.Count().Equals(17));
|
Assert.IsTrue(response.Response.Content.Count().Equals(17));
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public async Task UrlHandlersTest()
|
public async Task UrlHandlersTest()
|
||||||
{
|
{
|
||||||
var response = await Mpc.SendAsync(Command.Reflection.UrlHandlers());
|
var response = await Mpc.SendAsync(commands => commands.Reflection.UrlHandlers());
|
||||||
|
|
||||||
TestOutput.WriteLine($"UrlHandlersTest (handlers: {response.Response.Body.Count()}) Result:");
|
TestOutput.WriteLine($"UrlHandlersTest (handlers: {response.Response.Content.Count()}) Result:");
|
||||||
TestOutput.WriteLine(response);
|
TestOutput.WriteLine(response);
|
||||||
|
|
||||||
// Different answer from MPD on Windows and on Linux.
|
// Different answer from MPD on Windows and on Linux.
|
||||||
// Check some of the handlers.
|
// Check some of the handlers.
|
||||||
Assert.IsTrue(response.Response.Body.Any(handler => handler.Equals("http://")));
|
Assert.IsTrue(response.Response.Content.Any(handler => handler.Equals("http://")));
|
||||||
Assert.IsTrue(response.Response.Body.Any(handler => handler.Equals("mms://")));
|
Assert.IsTrue(response.Response.Content.Any(handler => handler.Equals("mms://")));
|
||||||
Assert.IsTrue(response.Response.Body.Any(handler => handler.Equals("gopher://")));
|
Assert.IsTrue(response.Response.Content.Any(handler => handler.Equals("gopher://")));
|
||||||
Assert.IsTrue(response.Response.Body.Any(handler => handler.Equals("rtp://")));
|
Assert.IsTrue(response.Response.Content.Any(handler => handler.Equals("rtp://")));
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public async Task DecodersTest()
|
public async Task DecodersTest()
|
||||||
{
|
{
|
||||||
var response = await Mpc.SendAsync(Command.Reflection.Decoders());
|
var response = await Mpc.SendAsync(commands => commands.Reflection.Decoders());
|
||||||
|
|
||||||
TestOutput.WriteLine($"DecodersTest (decoders: {response.Response.Body.Count()}) Result:");
|
TestOutput.WriteLine($"DecodersTest (decoders: {response.Response.Content.Count()}) Result:");
|
||||||
TestOutput.WriteLine(response);
|
TestOutput.WriteLine(response);
|
||||||
|
|
||||||
// Different answer from MPD on Windows and on Linux.
|
// Different answer from MPD on Windows and on Linux.
|
||||||
// Check some of the decoders.
|
// Check some of the decoders.
|
||||||
Assert.IsTrue(response.Response.Body.Any(decoder => decoder.Name.Equals("mad")));
|
Assert.IsTrue(response.Response.Content.Any(decoder => decoder.Name.Equals("mad")));
|
||||||
Assert.IsTrue(response.Response.Body.Any(decoder => decoder.Suffixes.Any(suffix => suffix.Equals("mp3"))));
|
Assert.IsTrue(response.Response.Content.Any(decoder => decoder.Suffixes.Any(suffix => suffix.Equals("mp3"))));
|
||||||
Assert.IsTrue(response.Response.Body.Any(decoder => decoder.MediaTypes.Any(mediaType => mediaType.Equals("audio/mpeg"))));
|
Assert.IsTrue(response.Response.Content.Any(decoder => decoder.MediaTypes.Any(mediaType => mediaType.Equals("audio/mpeg"))));
|
||||||
Assert.IsTrue(response.Response.Body.Any(decoder => decoder.Name.Equals("flac")));
|
Assert.IsTrue(response.Response.Content.Any(decoder => decoder.Name.Equals("flac")));
|
||||||
Assert.IsTrue(response.Response.Body.Any(decoder => decoder.Suffixes.Any(suffix => suffix.Equals("flac"))));
|
Assert.IsTrue(response.Response.Content.Any(decoder => decoder.Suffixes.Any(suffix => suffix.Equals("flac"))));
|
||||||
Assert.IsTrue(response.Response.Body.Any(decoder => decoder.MediaTypes.Any(mediaType => mediaType.Equals("audio/flac"))));
|
Assert.IsTrue(response.Response.Content.Any(decoder => decoder.MediaTypes.Any(mediaType => mediaType.Equals("audio/flac"))));
|
||||||
Assert.IsTrue(response.Response.Body.Any(decoder => decoder.MediaTypes.Any(mediaType => mediaType.Equals("audio/x-flac"))));
|
Assert.IsTrue(response.Response.Content.Any(decoder => decoder.MediaTypes.Any(mediaType => mediaType.Equals("audio/x-flac"))));
|
||||||
Assert.IsTrue(response.Response.Body.Any(decoder => decoder.Name.Equals("ffmpeg")));
|
Assert.IsTrue(response.Response.Content.Any(decoder => decoder.Name.Equals("ffmpeg")));
|
||||||
Assert.IsTrue(response.Response.Body.Any(decoder => decoder.Suffixes.Any(suffix => suffix.Equals("aac"))));
|
Assert.IsTrue(response.Response.Content.Any(decoder => decoder.Suffixes.Any(suffix => suffix.Equals("aac"))));
|
||||||
Assert.IsTrue(response.Response.Body.Any(decoder => decoder.Suffixes.Any(suffix => suffix.Equals("mpeg"))));
|
Assert.IsTrue(response.Response.Content.Any(decoder => decoder.Suffixes.Any(suffix => suffix.Equals("mpeg"))));
|
||||||
Assert.IsTrue(response.Response.Body.Any(decoder => decoder.MediaTypes.Any(mediaType => mediaType.Equals("audio/aac"))));
|
Assert.IsTrue(response.Response.Content.Any(decoder => decoder.MediaTypes.Any(mediaType => mediaType.Equals("audio/aac"))));
|
||||||
Assert.IsTrue(response.Response.Body.Any(decoder => decoder.MediaTypes.Any(mediaType => mediaType.Equals("audio/mpeg"))));
|
Assert.IsTrue(response.Response.Content.Any(decoder => decoder.MediaTypes.Any(mediaType => mediaType.Equals("audio/mpeg"))));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="CommandFactory.cs" company="Hukano">
|
// <copyright file="CommandFactory.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="CurrentPlaylistCommandFactory.cs" company="Hukano">
|
// <copyright file="CurrentPlaylistCommandFactory.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
@ -11,12 +11,12 @@ namespace MpcNET.Commands
|
|||||||
using MpcNET.Types;
|
using MpcNET.Types;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// https://www.musicpd.org/doc/protocol/queue.html
|
/// https://www.musicpd.org/doc/protocol/queue.html.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class CurrentPlaylistCommandFactory : ICurrentPlaylistCommandFactory
|
public class CurrentPlaylistCommandFactory : ICurrentPlaylistCommandFactory
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Command: add
|
/// Command: add.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="directory">The directory.</param>
|
/// <param name="directory">The directory.</param>
|
||||||
/// <returns>An <see cref="AddCommand"/>.</returns>
|
/// <returns>An <see cref="AddCommand"/>.</returns>
|
||||||
@ -26,7 +26,7 @@ namespace MpcNET.Commands
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Command: addid
|
/// Command: addid.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="songPath">The song path.</param>
|
/// <param name="songPath">The song path.</param>
|
||||||
/// <returns>An <see cref="AddIdCommand"/>.</returns>
|
/// <returns>An <see cref="AddIdCommand"/>.</returns>
|
||||||
@ -36,7 +36,7 @@ namespace MpcNET.Commands
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Command: clear
|
/// Command: clear.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>An <see cref="ClearCommand"/>.</returns>
|
/// <returns>An <see cref="ClearCommand"/>.</returns>
|
||||||
public IMpcCommand<string> Clear()
|
public IMpcCommand<string> Clear()
|
||||||
@ -45,7 +45,7 @@ namespace MpcNET.Commands
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Command: playlist
|
/// Command: playlist.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>A <see cref="PlaylistCommand"/>.</returns>
|
/// <returns>A <see cref="PlaylistCommand"/>.</returns>
|
||||||
public IMpcCommand<IEnumerable<IMpdFile>> GetAllSongsInfo()
|
public IMpcCommand<IEnumerable<IMpdFile>> GetAllSongsInfo()
|
||||||
@ -54,7 +54,7 @@ namespace MpcNET.Commands
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Command: delete
|
/// Command: delete.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="position">The position.</param>
|
/// <param name="position">The position.</param>
|
||||||
/// <returns>A <see cref="DeleteCommand" />.</returns>
|
/// <returns>A <see cref="DeleteCommand" />.</returns>
|
||||||
@ -64,7 +64,7 @@ namespace MpcNET.Commands
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Command: deleteid
|
/// Command: deleteid.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="songId">The song identifier.</param>
|
/// <param name="songId">The song identifier.</param>
|
||||||
/// <returns>A <see cref="DeleteIdCommand"/>.</returns>
|
/// <returns>A <see cref="DeleteIdCommand"/>.</returns>
|
||||||
@ -74,7 +74,7 @@ namespace MpcNET.Commands
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Command: playlistid
|
/// Command: playlistid.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="songId">The song identifier.</param>
|
/// <param name="songId">The song identifier.</param>
|
||||||
/// <returns>A <see cref="PlaylistIdCommand" />.</returns>
|
/// <returns>A <see cref="PlaylistIdCommand" />.</returns>
|
||||||
@ -84,7 +84,7 @@ namespace MpcNET.Commands
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Command: playlistinfo
|
/// Command: playlistinfo.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>A <see cref="PlaylistInfoCommand" />.</returns>
|
/// <returns>A <see cref="PlaylistInfoCommand" />.</returns>
|
||||||
public IMpcCommand<IEnumerable<IMpdFile>> GetAllSongMetadata()
|
public IMpcCommand<IEnumerable<IMpdFile>> GetAllSongMetadata()
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="FindCommand.cs" company="Hukano">
|
// <copyright file="FindCommand.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="ListAllCommand.cs" company="Hukano">
|
// <copyright file="ListAllCommand.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
@ -21,7 +21,7 @@ namespace MpcNET.Commands.Database
|
|||||||
{
|
{
|
||||||
var rootDirectory = new List<MpdDirectory>
|
var rootDirectory = new List<MpdDirectory>
|
||||||
{
|
{
|
||||||
new MpdDirectory("/") // Add by default the root directory
|
new MpdDirectory("/"), // Add by default the root directory
|
||||||
};
|
};
|
||||||
|
|
||||||
foreach (var line in response)
|
foreach (var line in response)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="ListCommand.cs" company="Hukano">
|
// <copyright file="ListCommand.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="UpdateCommand.cs" company="Hukano">
|
// <copyright file="UpdateCommand.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="DatabaseCommandFactory.cs" company="Hukano">
|
// <copyright file="DatabaseCommandFactory.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
@ -12,7 +12,7 @@ namespace MpcNET.Commands
|
|||||||
using MpcNET.Types;
|
using MpcNET.Types;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// https://www.musicpd.org/doc/protocol/database.html
|
/// https://www.musicpd.org/doc/protocol/database.html.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class DatabaseCommandFactory : IDatabaseCommandFactory
|
public class DatabaseCommandFactory : IDatabaseCommandFactory
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="ICurrentPlaylistCommandFactory.cs" company="Hukano">
|
// <copyright file="ICurrentPlaylistCommandFactory.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
@ -16,54 +16,54 @@ namespace MpcNET.Commands
|
|||||||
public interface ICurrentPlaylistCommandFactory
|
public interface ICurrentPlaylistCommandFactory
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Command: add
|
/// Command: add.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="directory">The directory.</param>
|
/// <param name="directory">The directory.</param>
|
||||||
/// <returns>An <see cref="AddCommand"/>.</returns>
|
/// <returns>An <see cref="AddCommand"/>.</returns>
|
||||||
IMpcCommand<string> AddDirectory(string directory);
|
IMpcCommand<string> AddDirectory(string directory);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Command: addid
|
/// Command: addid.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="songPath">The song path.</param>
|
/// <param name="songPath">The song path.</param>
|
||||||
/// <returns>An <see cref="AddIdCommand"/>.</returns>
|
/// <returns>An <see cref="AddIdCommand"/>.</returns>
|
||||||
IMpcCommand<string> AddSong(string songPath);
|
IMpcCommand<string> AddSong(string songPath);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Command: clear
|
/// Command: clear.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>An <see cref="ClearCommand"/>.</returns>
|
/// <returns>An <see cref="ClearCommand"/>.</returns>
|
||||||
IMpcCommand<string> Clear();
|
IMpcCommand<string> Clear();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Command: playlist
|
/// Command: playlist.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>A <see cref="PlaylistCommand"/>.</returns>
|
/// <returns>A <see cref="PlaylistCommand"/>.</returns>
|
||||||
IMpcCommand<IEnumerable<IMpdFile>> GetAllSongsInfo();
|
IMpcCommand<IEnumerable<IMpdFile>> GetAllSongsInfo();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Command: delete
|
/// Command: delete.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="position">The position.</param>
|
/// <param name="position">The position.</param>
|
||||||
/// <returns>A <see cref="DeleteCommand" />.</returns>
|
/// <returns>A <see cref="DeleteCommand" />.</returns>
|
||||||
IMpcCommand<string> RemoveSongByPosition(int position);
|
IMpcCommand<string> RemoveSongByPosition(int position);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Command: deleteid
|
/// Command: deleteid.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="songId">The song identifier.</param>
|
/// <param name="songId">The song identifier.</param>
|
||||||
/// <returns>A <see cref="DeleteIdCommand"/>.</returns>
|
/// <returns>A <see cref="DeleteIdCommand"/>.</returns>
|
||||||
IMpcCommand<string> RemoveSongById(int songId);
|
IMpcCommand<string> RemoveSongById(int songId);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Command: playlistid
|
/// Command: playlistid.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="songId">The song identifier.</param>
|
/// <param name="songId">The song identifier.</param>
|
||||||
/// <returns>A <see cref="PlaylistIdCommand" />.</returns>
|
/// <returns>A <see cref="PlaylistIdCommand" />.</returns>
|
||||||
IMpcCommand<IEnumerable<IMpdFile>> GetSongMetadata(int songId);
|
IMpcCommand<IEnumerable<IMpdFile>> GetSongMetadata(int songId);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Command: playlistinfo
|
/// Command: playlistinfo.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>A <see cref="PlaylistInfoCommand" />.</returns>
|
/// <returns>A <see cref="PlaylistInfoCommand" />.</returns>
|
||||||
IMpcCommand<IEnumerable<IMpdFile>> GetAllSongMetadata();
|
IMpcCommand<IEnumerable<IMpdFile>> GetAllSongMetadata();
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="IDatabaseCommandFactory.cs" company="Hukano">
|
// <copyright file="IDatabaseCommandFactory.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="IOutputCommandFactory.cs" company="Hukano">
|
// <copyright file="IOutputCommandFactory.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="IPlaybackCommandFactory.cs" company="Hukano">
|
// <copyright file="IPlaybackCommandFactory.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="IReflectionCommandFactory.cs" company="Hukano">
|
// <copyright file="IReflectionCommandFactory.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="IStatusCommandFactory.cs" company="Hukano">
|
// <copyright file="IStatusCommandFactory.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="IStoredPlaylistCommandFactory.cs" company="Hukano">
|
// <copyright file="IStoredPlaylistCommandFactory.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
@ -16,28 +16,28 @@ namespace MpcNET.Commands
|
|||||||
public interface IStoredPlaylistCommandFactory
|
public interface IStoredPlaylistCommandFactory
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Command: load
|
/// Command: load.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="playlistName">Name of the playlist.</param>
|
/// <param name="playlistName">Name of the playlist.</param>
|
||||||
/// <returns>A <see cref="LoadCommand" />.</returns>
|
/// <returns>A <see cref="LoadCommand" />.</returns>
|
||||||
IMpcCommand<string> Load(string playlistName);
|
IMpcCommand<string> Load(string playlistName);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Command: listplaylist
|
/// Command: listplaylist.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="playlistName">Name of the playlist.</param>
|
/// <param name="playlistName">Name of the playlist.</param>
|
||||||
/// <returns>A <see cref="ListPlaylistCommand" />.</returns>
|
/// <returns>A <see cref="ListPlaylistCommand" />.</returns>
|
||||||
IMpcCommand<IEnumerable<IMpdFilePath>> GetContent(string playlistName);
|
IMpcCommand<IEnumerable<IMpdFilePath>> GetContent(string playlistName);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Command: listplaylistinfo
|
/// Command: listplaylistinfo.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="playlistName">Name of the playlist.</param>
|
/// <param name="playlistName">Name of the playlist.</param>
|
||||||
/// <returns>A <see cref="ListPlaylistInfoCommand" />.</returns>
|
/// <returns>A <see cref="ListPlaylistInfoCommand" />.</returns>
|
||||||
IMpcCommand<IEnumerable<IMpdFile>> GetContentWithMetadata(string playlistName);
|
IMpcCommand<IEnumerable<IMpdFile>> GetContentWithMetadata(string playlistName);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Command: listplaylists
|
/// Command: listplaylists.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>A <see cref="ListPlaylistsCommand" />.</returns>
|
/// <returns>A <see cref="ListPlaylistsCommand" />.</returns>
|
||||||
IMpcCommand<IEnumerable<MpdPlaylist>> GetAll();
|
IMpcCommand<IEnumerable<MpdPlaylist>> GetAll();
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="DisableOutputCommand.cs" company="Hukano">
|
// <copyright file="DisableOutputCommand.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="EnableOutputCommand.cs" company="Hukano">
|
// <copyright file="EnableOutputCommand.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="OutputsCommand.cs" company="Hukano">
|
// <copyright file="OutputsCommand.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="ToggleOutputCommand.cs" company="Hukano">
|
// <copyright file="ToggleOutputCommand.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="OutputCommandFactory.cs" company="Hukano">
|
// <copyright file="OutputCommandFactory.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
@ -11,7 +11,7 @@ namespace MpcNET.Commands
|
|||||||
using MpcNET.Types;
|
using MpcNET.Types;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// https://www.musicpd.org/doc/protocol/output_commands.html
|
/// https://www.musicpd.org/doc/protocol/output_commands.html.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class OutputCommandFactory : IOutputCommandFactory
|
public class OutputCommandFactory : IOutputCommandFactory
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="NextCommand.cs" company="Hukano">
|
// <copyright file="NextCommand.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="PlayCommand.cs" company="Hukano">
|
// <copyright file="PlayCommand.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="PlayPauseCommand.cs" company="Hukano">
|
// <copyright file="PlayPauseCommand.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="PreviousCommand.cs" company="Hukano">
|
// <copyright file="PreviousCommand.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="SetVolumeCommand.cs" company="Hukano">
|
// <copyright file="SetVolumeCommand.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="StopCommand.cs" company="Hukano">
|
// <copyright file="StopCommand.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="PlaybackCommandFactory.cs" company="Hukano">
|
// <copyright file="PlaybackCommandFactory.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
@ -10,7 +10,7 @@ namespace MpcNET.Commands
|
|||||||
using MpcNET.Types;
|
using MpcNET.Types;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// https://www.musicpd.org/doc/protocol/playback_commands.html
|
/// https://www.musicpd.org/doc/protocol/playback_commands.html.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class PlaybackCommandFactory : IPlaybackCommandFactory
|
public class PlaybackCommandFactory : IPlaybackCommandFactory
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="AddCommand.cs" company="Hukano">
|
// <copyright file="AddCommand.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="AddIdCommand.cs" company="Hukano">
|
// <copyright file="AddIdCommand.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="ClearCommand.cs" company="Hukano">
|
// <copyright file="ClearCommand.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="DeleteCommand.cs" company="Hukano">
|
// <copyright file="DeleteCommand.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="DeleteIdCommand.cs" company="Hukano">
|
// <copyright file="DeleteIdCommand.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
@ -9,7 +9,7 @@ namespace MpcNET.Commands.Playlist
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Deletes the song SONGID from the playlist
|
/// Deletes the song SONGID from the playlist.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal class DeleteIdCommand : IMpcCommand<string>
|
internal class DeleteIdCommand : IMpcCommand<string>
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="ListPlaylistCommand.cs" company="Hukano">
|
// <copyright file="ListPlaylistCommand.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="ListPlaylistInfoCommand.cs" company="Hukano">
|
// <copyright file="ListPlaylistInfoCommand.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="ListPlaylistsCommand.cs" company="Hukano">
|
// <copyright file="ListPlaylistsCommand.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="LoadCommand.cs" company="Hukano">
|
// <copyright file="LoadCommand.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="PlaylistCommand.cs" company="Hukano">
|
// <copyright file="PlaylistCommand.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="PlaylistIdCommand.cs" company="Hukano">
|
// <copyright file="PlaylistIdCommand.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="PlaylistInfoCommand.cs" company="Hukano">
|
// <copyright file="PlaylistInfoCommand.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
@ -10,7 +10,7 @@ namespace MpcNET.Commands.Playlist
|
|||||||
using MpcNET.Types;
|
using MpcNET.Types;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Displays a list of all songs in the playlist,
|
/// Displays a list of all songs in the playlist.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal class PlaylistInfoCommand : IMpcCommand<IEnumerable<IMpdFile>>
|
internal class PlaylistInfoCommand : IMpcCommand<IEnumerable<IMpdFile>>
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="CommandsCommand.cs" company="Hukano">
|
// <copyright file="CommandsCommand.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="DecodersCommand.cs" company="Hukano">
|
// <copyright file="DecodersCommand.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="TagTypesCommand.cs" company="Hukano">
|
// <copyright file="TagTypesCommand.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="UrlHandlersCommand.cs" company="Hukano">
|
// <copyright file="UrlHandlersCommand.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="ReflectionCommandFactory.cs" company="Hukano">
|
// <copyright file="ReflectionCommandFactory.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
@ -11,7 +11,7 @@ namespace MpcNET.Commands
|
|||||||
using MpcNET.Types;
|
using MpcNET.Types;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// https://www.musicpd.org/doc/protocol/reflection_commands.html
|
/// https://www.musicpd.org/doc/protocol/reflection_commands.html.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class ReflectionCommandFactory : IReflectionCommandFactory
|
public class ReflectionCommandFactory : IReflectionCommandFactory
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="CurrentSongCommand.cs" company="Hukano">
|
// <copyright file="CurrentSongCommand.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="IdleCommand.cs" company="Hukano">
|
// <copyright file="IdleCommand.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="NoIdleCommand.cs" company="Hukano">
|
// <copyright file="NoIdleCommand.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="StatusCommand.cs" company="Hukano">
|
// <copyright file="StatusCommand.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="StatusCommandFactory.cs" company="Hukano">
|
// <copyright file="StatusCommandFactory.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
@ -10,7 +10,7 @@ namespace MpcNET.Commands
|
|||||||
using MpcNET.Types;
|
using MpcNET.Types;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// https://www.musicpd.org/doc/protocol/command_reference.html#status_commands
|
/// https://www.musicpd.org/doc/protocol/command_reference.html#status_commands.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class StatusCommandFactory : IStatusCommandFactory
|
public class StatusCommandFactory : IStatusCommandFactory
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="StoredPlaylistCommandFactory.cs" company="Hukano">
|
// <copyright file="StoredPlaylistCommandFactory.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
@ -11,12 +11,12 @@ namespace MpcNET.Commands
|
|||||||
using MpcNET.Types;
|
using MpcNET.Types;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// https://www.musicpd.org/doc/protocol/playlist_files.html
|
/// https://www.musicpd.org/doc/protocol/playlist_files.html.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class StoredPlaylistCommandFactory : IStoredPlaylistCommandFactory
|
public class StoredPlaylistCommandFactory : IStoredPlaylistCommandFactory
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Command: load
|
/// Command: load.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="playlistName">Name of the playlist.</param>
|
/// <param name="playlistName">Name of the playlist.</param>
|
||||||
/// <returns>A <see cref="LoadCommand" />.</returns>
|
/// <returns>A <see cref="LoadCommand" />.</returns>
|
||||||
@ -26,7 +26,7 @@ namespace MpcNET.Commands
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Command: listplaylist
|
/// Command: listplaylist.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="playlistName">Name of the playlist.</param>
|
/// <param name="playlistName">Name of the playlist.</param>
|
||||||
/// <returns>A <see cref="ListPlaylistCommand" />.</returns>
|
/// <returns>A <see cref="ListPlaylistCommand" />.</returns>
|
||||||
@ -36,7 +36,7 @@ namespace MpcNET.Commands
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Command: listplaylistinfo
|
/// Command: listplaylistinfo.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="playlistName">Name of the playlist.</param>
|
/// <param name="playlistName">Name of the playlist.</param>
|
||||||
/// <returns>A <see cref="ListPlaylistInfoCommand" />.</returns>
|
/// <returns>A <see cref="ListPlaylistInfoCommand" />.</returns>
|
||||||
@ -46,7 +46,7 @@ namespace MpcNET.Commands
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Command: listplaylists
|
/// Command: listplaylists.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>A <see cref="ListPlaylistsCommand" />.</returns>
|
/// <returns>A <see cref="ListPlaylistsCommand" />.</returns>
|
||||||
public IMpcCommand<IEnumerable<MpdPlaylist>> GetAll()
|
public IMpcCommand<IEnumerable<MpdPlaylist>> GetAll()
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="Constants.cs" company="Hukano">
|
// <copyright file="Constants.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="CommandNullException.cs" company="Hukano">
|
// <copyright file="CommandNullException.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="EmptyResponseException.cs" company="Hukano">
|
// <copyright file="EmptyResponseException.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="MpcConnectException.cs" company="Hukano">
|
// <copyright file="MpcConnectException.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="MpcException.cs" company="Hukano">
|
// <copyright file="MpcException.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="ICommandFactory.cs" company="Hukano">
|
// <copyright file="ICommandFactory.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="IMpcCommand.cs" company="Hukano">
|
// <copyright file="IMpcCommand.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="IMpcConnection.cs" company="Hukano">
|
// <copyright file="IMpcConnection.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="IMpcConnectionObserver.cs" company="Hukano">
|
// <copyright file="IMpcConnectionReporter.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
@ -11,7 +11,7 @@ namespace MpcNET
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Interface for implementing an observer for <see cref="MpcConnection"/>.
|
/// Interface for implementing an observer for <see cref="MpcConnection"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IMpcConnectionObserver
|
public interface IMpcConnectionReporter
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Called when connecting.
|
/// Called when connecting.
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="ErrorMpdMessage.cs" company="Hukano">
|
// <copyright file="ErrorMpdMessage.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="ErrorMpdResponse.cs" company="Hukano">
|
// <copyright file="ErrorMpdResponse.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="IMpdMessage.cs" company="Hukano">
|
// <copyright file="IMpdMessage.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="IMpdRequest.cs" company="Hukano">
|
// <copyright file="IMpdRequest.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="IMpdResponse.cs" company="Hukano">
|
// <copyright file="IMpdResponse.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="IMpdResponseResult.cs" company="Hukano">
|
// <copyright file="IMpdResponseResult.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="MpdMessage.cs" company="Hukano">
|
// <copyright file="MpdMessage.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="MpdRequest.cs" company="Hukano">
|
// <copyright file="MpdRequest.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="MpdResponse.cs" company="Hukano">
|
// <copyright file="MpdResponse.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="MpdResponseResult.cs" company="Hukano">
|
// <copyright file="MpdResponseResult.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="MpcConnection.cs" company="Hukano">
|
// <copyright file="MpcConnection.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
@ -27,7 +27,7 @@ namespace MpcNET
|
|||||||
{
|
{
|
||||||
private static readonly Encoding Encoding = new UTF8Encoding();
|
private static readonly Encoding Encoding = new UTF8Encoding();
|
||||||
private readonly ICommandFactory commandFactory;
|
private readonly ICommandFactory commandFactory;
|
||||||
private readonly IMpcConnectionObserver mpcConnectionObserver;
|
private readonly IMpcConnectionReporter mpcConnectionReporter;
|
||||||
private readonly IPEndPoint server;
|
private readonly IPEndPoint server;
|
||||||
|
|
||||||
private TcpClient tcpClient;
|
private TcpClient tcpClient;
|
||||||
@ -40,11 +40,11 @@ namespace MpcNET
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="server">The server.</param>
|
/// <param name="server">The server.</param>
|
||||||
/// <param name="commandFactory">The command factory.</param>
|
/// <param name="commandFactory">The command factory.</param>
|
||||||
/// <param name="mpcConnectionObserver">The MPC connection logger.</param>
|
/// <param name="mpcConnectionReporter">The MPC connection logger.</param>
|
||||||
public MpcConnection(IPEndPoint server, ICommandFactory commandFactory = null, IMpcConnectionObserver mpcConnectionObserver = null)
|
public MpcConnection(IPEndPoint server, ICommandFactory commandFactory = null, IMpcConnectionReporter mpcConnectionReporter = null)
|
||||||
{
|
{
|
||||||
this.commandFactory = commandFactory ?? new CommandFactory();
|
this.commandFactory = commandFactory ?? new CommandFactory();
|
||||||
this.mpcConnectionObserver = mpcConnectionObserver;
|
this.mpcConnectionReporter = mpcConnectionReporter;
|
||||||
this.ClearConnectionFields();
|
this.ClearConnectionFields();
|
||||||
this.server = server ?? throw new ArgumentNullException("Server IPEndPoint not set.", nameof(server));
|
this.server = server ?? throw new ArgumentNullException("Server IPEndPoint not set.", nameof(server));
|
||||||
}
|
}
|
||||||
@ -106,7 +106,7 @@ namespace MpcNET
|
|||||||
IReadOnlyList<string> response = new List<string>();
|
IReadOnlyList<string> response = new List<string>();
|
||||||
var sendAttempter = new Attempter(3);
|
var sendAttempter = new Attempter(3);
|
||||||
var commandText = command.Serialize();
|
var commandText = command.Serialize();
|
||||||
this.mpcConnectionObserver?.Sending(commandText);
|
this.mpcConnectionReporter?.Sending(commandText);
|
||||||
while (sendAttempter.Attempt())
|
while (sendAttempter.Attempt())
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@ -129,9 +129,9 @@ namespace MpcNET
|
|||||||
catch (Exception exception)
|
catch (Exception exception)
|
||||||
{
|
{
|
||||||
lastException = exception;
|
lastException = exception;
|
||||||
this.mpcConnectionObserver?.SendException(commandText, sendAttempter.CurrentAttempt, exception);
|
this.mpcConnectionReporter?.SendException(commandText, sendAttempter.CurrentAttempt, exception);
|
||||||
await this.ReconnectAsync(true);
|
await this.ReconnectAsync(true);
|
||||||
this.mpcConnectionObserver?.RetrySend(commandText, sendAttempter.CurrentAttempt);
|
this.mpcConnectionReporter?.RetrySend(commandText, sendAttempter.CurrentAttempt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -186,14 +186,14 @@ namespace MpcNET
|
|||||||
var connectAttempter = new Attempter(3);
|
var connectAttempter = new Attempter(3);
|
||||||
while (connectAttempter.Attempt())
|
while (connectAttempter.Attempt())
|
||||||
{
|
{
|
||||||
this.mpcConnectionObserver?.Connecting(isReconnect, connectAttempter.CurrentAttempt);
|
this.mpcConnectionReporter?.Connecting(isReconnect, connectAttempter.CurrentAttempt);
|
||||||
await this.DisconnectAsync(false);
|
await this.DisconnectAsync(false);
|
||||||
|
|
||||||
this.tcpClient = new TcpClient();
|
this.tcpClient = new TcpClient();
|
||||||
await this.tcpClient.ConnectAsync(this.server.Address, this.server.Port);
|
await this.tcpClient.ConnectAsync(this.server.Address, this.server.Port);
|
||||||
if (this.tcpClient.Connected)
|
if (this.tcpClient.Connected)
|
||||||
{
|
{
|
||||||
this.mpcConnectionObserver?.ConnectionAccepted(isReconnect, connectAttempter.CurrentAttempt);
|
this.mpcConnectionReporter?.ConnectionAccepted(isReconnect, connectAttempter.CurrentAttempt);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -209,7 +209,7 @@ namespace MpcNET
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.version = firstLine.Substring(Constants.FirstLinePrefix.Length);
|
this.version = firstLine.Substring(Constants.FirstLinePrefix.Length);
|
||||||
this.mpcConnectionObserver?.Connected(isReconnect, connectAttempter.CurrentAttempt, firstLine);
|
this.mpcConnectionReporter?.Connected(isReconnect, connectAttempter.CurrentAttempt, firstLine);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -222,7 +222,7 @@ namespace MpcNET
|
|||||||
do
|
do
|
||||||
{
|
{
|
||||||
responseLine = await reader.ReadLineAsync();
|
responseLine = await reader.ReadLineAsync();
|
||||||
this.mpcConnectionObserver.ReadResponse(responseLine);
|
this.mpcConnectionReporter.ReadResponse(responseLine);
|
||||||
if (responseLine == null)
|
if (responseLine == null)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
@ -238,14 +238,14 @@ namespace MpcNET
|
|||||||
|
|
||||||
private Task DisconnectAsync(bool isExplicitDisconnect)
|
private Task DisconnectAsync(bool isExplicitDisconnect)
|
||||||
{
|
{
|
||||||
this.mpcConnectionObserver?.Disconnecting(isExplicitDisconnect);
|
this.mpcConnectionReporter?.Disconnecting(isExplicitDisconnect);
|
||||||
if (this.tcpClient == null)
|
if (this.tcpClient == null)
|
||||||
{
|
{
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.ClearConnectionFields();
|
this.ClearConnectionFields();
|
||||||
this.mpcConnectionObserver?.Disconnected(isExplicitDisconnect);
|
this.mpcConnectionReporter?.Disconnected(isExplicitDisconnect);
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,11 +3,13 @@
|
|||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>netstandard2.0</TargetFramework>
|
<TargetFramework>netstandard2.0</TargetFramework>
|
||||||
<AssemblyName>MpcNET</AssemblyName>
|
<AssemblyName>MpcNET</AssemblyName>
|
||||||
<PackageId>MpcNET</PackageId>
|
<PackageId>MpcNET.SundewFork</PackageId>
|
||||||
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
|
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
|
||||||
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
|
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
|
||||||
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
|
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
|
||||||
<RootNamespace>MpcNET</RootNamespace>
|
<RootNamespace>MpcNET</RootNamespace>
|
||||||
|
<Version>0.0.0-pre000</Version>
|
||||||
|
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||||
@ -36,8 +38,8 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="10.0.3" />
|
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
||||||
<PackageReference Include="Sundew.Base" Version="3.1.0-pre013" />
|
<PackageReference Include="Sundew.Base" Version="3.2.0-pre014" />
|
||||||
<PackageReference Include="System.ValueTuple" Version="4.4.0" />
|
<PackageReference Include="System.ValueTuple" Version="4.4.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="MpdDirectoryListing.cs" company="Hukano">
|
// <copyright file="MpdDirectoryListing.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="MpdState.cs" company="Hukano">
|
// <copyright file="MpdState.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
@ -29,6 +29,6 @@ namespace MpcNET
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// The playback of the MPD is currently paused.
|
/// The playback of the MPD is currently paused.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Pause
|
Pause,
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="MpdStatistics.cs" company="Hukano">
|
// <copyright file="MpdStatistics.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="MpdStatus.cs" company="Hukano">
|
// <copyright file="MpdStatus.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="AssemblyInfo.cs" company="Hukano">
|
// <copyright file="AssemblyInfo.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="FindTags.cs" company="Hukano">
|
// <copyright file="FindTags.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
namespace MpcNET.Tags
|
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].
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class FindTags
|
public class FindTags
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="ITag.cs" company="Hukano">
|
// <copyright file="ITag.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="MpdTags.cs" company="Hukano">
|
// <copyright file="MpdTags.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
namespace MpcNET.Tags
|
namespace MpcNET.Tags
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// https://www.musicpd.org/doc/protocol/tags.html
|
/// https://www.musicpd.org/doc/protocol/tags.html.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class MpdTags
|
public class MpdTags
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="Tag.cs" company="Hukano">
|
// <copyright file="Tag.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="IMpdFile.cs" company="Hukano">
|
// <copyright file="IMpdFile.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="IMpdFilePath.cs" company="Hukano">
|
// <copyright file="IMpdFilePath.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="MpdDecoderPlugin.cs" company="Hukano">
|
// <copyright file="MpdDecoderPlugin.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="MpdDirectory.cs" company="Hukano">
|
// <copyright file="MpdDirectory.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="MpdFile.cs" company="Hukano">
|
// <copyright file="MpdFile.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
@ -187,7 +187,7 @@ namespace MpcNET.Types
|
|||||||
return new MpdFile(path, pos: pos);
|
return new MpdFile(path, pos: pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
internal static(IMpdFile mpdFile, int index) Create(
|
internal static (IMpdFile mpdFile, int index) Create(
|
||||||
IReadOnlyList<KeyValuePair<string, string>> response,
|
IReadOnlyList<KeyValuePair<string, string>> response,
|
||||||
int startIndex)
|
int startIndex)
|
||||||
{
|
{
|
||||||
@ -334,7 +334,7 @@ namespace MpcNET.Types
|
|||||||
var mpdFiles = new List<IMpdFile>();
|
var mpdFiles = new List<IMpdFile>();
|
||||||
for (var index = 0; index < response.Count; index++)
|
for (var index = 0; index < response.Count; index++)
|
||||||
{
|
{
|
||||||
var(mpdFile, lastIndex) = Create(response, index);
|
var (mpdFile, lastIndex) = Create(response, index);
|
||||||
if (mpdFile != null)
|
if (mpdFile != null)
|
||||||
{
|
{
|
||||||
mpdFiles.Add(mpdFile);
|
mpdFiles.Add(mpdFile);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="MpdOutput.cs" company="Hukano">
|
// <copyright file="MpdOutput.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
// <copyright file="MpdPlaylist.cs" company="Hukano">
|
// <copyright file="MpdPlaylist.cs" company="MpcNET">
|
||||||
// Copyright (c) Hukano. All rights reserved.
|
// Copyright (c) MpcNET. All rights reserved.
|
||||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||||
// </copyright>
|
// </copyright>
|
||||||
// --------------------------------------------------------------------------------------------------------------------
|
// --------------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
"$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json",
|
"$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json",
|
||||||
"settings": {
|
"settings": {
|
||||||
"documentationRules": {
|
"documentationRules": {
|
||||||
"companyName": "Hukano",
|
"companyName": "MpcNET",
|
||||||
"xmlHeader": true,
|
"xmlHeader": true,
|
||||||
"copyrightText": "Copyright (c) {companyName}. All rights reserved.\nLicensed under the {licenseName} license. See {licenseFile} file in the project root for full license information.",
|
"copyrightText": "Copyright (c) {companyName}. All rights reserved.\nLicensed under the {licenseName} license. See {licenseFile} file in the project root for full license information.",
|
||||||
"headerDecoration": "--------------------------------------------------------------------------------------------------------------------",
|
"headerDecoration": "--------------------------------------------------------------------------------------------------------------------",
|
||||||
@ -17,8 +17,7 @@
|
|||||||
"licenseFile": "LICENSE"
|
"licenseFile": "LICENSE"
|
||||||
},
|
},
|
||||||
"documentExposedElements": false,
|
"documentExposedElements": false,
|
||||||
"documentInternalElements": false,
|
"documentInternalElements": false
|
||||||
"documentInterfaces": false
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user