Added missing code documentation

This commit is contained in:
DarthAffe committed 2018-04-08 11:58:10 +02:00
1 parent bbbae7d75f
commit b471c0e192
40 files changed
+364 -19

No files matched your search

@@ -5,10 +5,18 @@ using Sanford.Multimedia.Midi;
namespace RGB.NET.Devices.Novation
{
/// <summary>
/// Represents the update-queue performing updates for a limited-color novation device.
/// </summary>
public class LimitedColorUpdateQueue : MidiUpdateQueue
{
#region Constructors
/// <summary>
/// Initializes a new instance of the <see cref="LimitedColorUpdateQueue"/> class.
/// </summary>
/// <param name="updateTrigger">The update trigger used by this queue.</param>
/// <param name="deviceId">The device-id of the device this queue is performing updates for.</param>
public LimitedColorUpdateQueue(IDeviceUpdateTrigger updateTrigger, int deviceId)
: base(updateTrigger, deviceId)
{ }
@@ -5,6 +5,11 @@ using Sanford.Multimedia.Midi;
namespace RGB.NET.Devices.Novation
{
/// <inheritdoc cref="UpdateQueue" />
/// <inheritdoc cref="IDisposable" />
/// <summary>
/// Represents the update-queue performing updates for midi devices.
/// </summary>
public abstract class MidiUpdateQueue : UpdateQueue, IDisposable
{
#region Properties & Fields
@@ -15,7 +20,13 @@ namespace RGB.NET.Devices.Novation
#region Constructors
public MidiUpdateQueue(IDeviceUpdateTrigger updateTrigger, int deviceId)
/// <inheritdoc />
/// <summary>
/// Initializes a new instance of the <see cref="T:RGB.NET.Devices.Novation.MidiUpdateQueue" /> class.
/// </summary>
/// <param name="updateTrigger">The update trigger used by this queue.</param>
/// <param name="deviceId">The id of the device this queue is performing updates for.</param>
protected MidiUpdateQueue(IDeviceUpdateTrigger updateTrigger, int deviceId)
: base(updateTrigger)
{
_outputDevice = new OutputDevice(deviceId);
@@ -32,14 +43,21 @@ namespace RGB.NET.Devices.Novation
SendMessage(CreateMessage(data));
}
/// <summary>
/// Sends the specified message to the device this queue is performing updates for.
/// </summary>
/// <param name="message">The message to send.</param>
protected virtual void SendMessage(ShortMessage message) => _outputDevice.SendShort(message.Message);
/// <summary>
/// Creates a update-message out of a given data set.
/// </summary>
/// <param name="data">The data set to create the message from.</param>
/// <returns>The message created out of the data set.</returns>
protected abstract ShortMessage CreateMessage(KeyValuePair<object, Color> data);
public void Dispose()
{
_outputDevice.Dispose();
}
/// <inheritdoc />
public void Dispose() => _outputDevice.Dispose();
#endregion
}
@@ -21,6 +21,10 @@ namespace RGB.NET.Devices.Novation
/// </summary>
public override TDeviceInfo DeviceInfo { get; }
/// <summary>
/// The <see cref="MidiUpdateQueue"/> used to update this <see cref="NovationRGBDevice{TDeviceInfo}"/>.
/// </summary>
// ReSharper disable once MemberCanBePrivate.Global
protected MidiUpdateQueue UpdateQueue { get; set; }
#endregion
@@ -39,6 +39,9 @@ namespace RGB.NET.Devices.Novation
/// <inheritdoc />
public IEnumerable<IRGBDevice> Devices { get; private set; }
/// <summary>
/// The <see cref="DeviceUpdateTrigger"/> used to trigger the updates for novation devices.
/// </summary>
public DeviceUpdateTrigger UpdateTrigger { get; private set; }
#endregion