Added tons of xml-comments.

This commit is contained in:
DarthAffe committed 2015-10-17 16:57:50 +02:00
1 parent 57ad0f30e2
commit 6de1087c1f
23 files changed
+422 -51

No files matched your search

+1
View File
@@ -35,6 +35,7 @@ namespace CUE.NET.Devices.Generic
CheckUpdateLoop();
}
}
/// <summary>
/// Gets or sets the update-frequency in seconds. (Calculate by using '1f / updates per second')
/// </summary>
+5 -2
View File
@@ -5,6 +5,9 @@ using CUE.NET.Native;
namespace CUE.NET.Devices.Generic
{
/// <summary>
/// Represents generic information about a CUE device.
/// </summary>
public class GenericDeviceInfo : IDeviceInfo
{
#region Properties & Fields
@@ -29,9 +32,9 @@ namespace CUE.NET.Devices.Generic
#region Constructors
/// <summary>
/// Internal constructor of managed CorsairDeviceInfo.
/// Internal constructor of managed <see cref="GenericDeviceInfo"/>.
/// </summary>
/// <param name="nativeInfo">The native CorsairDeviceInfo-struct</param>
/// <param name="nativeInfo">The native <see cref="_CorsairDeviceInfo" />-struct</param>
internal GenericDeviceInfo(_CorsairDeviceInfo nativeInfo)
{
this.Type = nativeInfo.type;
+4 -1
View File
@@ -1,4 +1,7 @@
using System;
// ReSharper disable MemberCanBePrivate.Global
// ReSharper disable UnusedAutoPropertyAccessor.Global
using System;
namespace CUE.NET.Devices.Generic
{
+30 -1
View File
@@ -1,4 +1,7 @@
using System.Collections;
// ReSharper disable UnusedAutoPropertyAccessor.Global
// ReSharper disable MemberCanBePrivate.Global
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
@@ -7,12 +10,21 @@ using CUE.NET.Devices.Headset.Enums;
namespace CUE.NET.Devices.Headset
{
/// <summary>
/// Represents the SDK for a corsair headset.
/// </summary>
public class CorsairHeadset : AbstractCueDevice, IEnumerable<CorsairLed>
{
#region Properties & Fields
#region Indexer
/// <summary>
/// Gets the <see cref="CorsairLed" /> with the specified ID.
/// </summary>
/// <param name="ledId">The ID of the LED to get.</param>
/// <returns>The LED with the specified ID.</returns>
/// <exception cref="System.ArgumentNullException" accessor="get"><paramref name="ledId" /> is null.</exception>
public CorsairLed this[CorsairHeadsetLedId ledId]
{
get
@@ -24,16 +36,29 @@ namespace CUE.NET.Devices.Headset
#endregion
/// <summary>
/// Gets specific information provided by CUE for the headset.
/// </summary>
public CorsairHeadsetDeviceInfo HeadsetDeviceInfo { get; }
/// <summary>
/// Indicates if the headset has an active effect to deal with.
/// </summary>
protected override bool HasEffect => false;
/// <summary>
/// Gets a read-only collection containing all LEDs of the headset.
/// </summary>
public new IEnumerable<CorsairLed> Leds => new ReadOnlyCollection<CorsairLed>(base.Leds.Values.ToList());
#endregion
#region Constructors
/// <summary>
/// Initializes a new instance of the <see cref="CorsairHeadset"/> class.
/// </summary>
/// <param name="info">The specific information provided by CUE for the headset</param>
internal CorsairHeadset(CorsairHeadsetDeviceInfo info)
: base(info)
{
@@ -53,6 +78,10 @@ namespace CUE.NET.Devices.Headset
#region IEnumerable
/// <summary>
/// Returns an enumerator that iterates over all LEDs of the headset.
/// </summary>
/// <returns>An enumerator for all LDS of the headset.</returns>
public IEnumerator<CorsairLed> GetEnumerator()
{
return Leds.GetEnumerator();
+5 -1
View File
@@ -4,10 +4,14 @@ using CUE.NET.Native;
namespace CUE.NET.Devices.Headset
{
/// <summary>
/// Stub for planned headset-support.
/// Represents specific information for a CUE headset.
/// </summary>
public class CorsairHeadsetDeviceInfo : GenericDeviceInfo
{
/// <summary>
/// Internal constructor of managed <see cref="CorsairHeadsetDeviceInfo" />.
/// </summary>
/// <param name="nativeInfo">The native <see cref="_CorsairDeviceInfo" />-struct</param>
internal CorsairHeadsetDeviceInfo(_CorsairDeviceInfo nativeInfo)
: base(nativeInfo)
{ }
@@ -3,6 +3,9 @@
namespace CUE.NET.Devices.Headset.Enums
{
/// <summary>
/// Contains list of all LEDs available for corsair headsets.
/// </summary>
public enum CorsairHeadsetLedId
{
Invalid = 0,
+24
View File
@@ -3,18 +3,42 @@ using CUE.NET.Devices.Generic.Enums;
namespace CUE.NET.Devices
{
/// <summary>
/// Represents the event-handler of the OnException-event.
/// </summary>
/// <param name="sender">The sender of the event.</param>
/// <param name="args">The arguments provided by the event.</param>
public delegate void OnExceptionEventHandler(object sender, OnExceptionEventArgs args);
/// <summary>
/// Represents a generic cue device.
/// </summary>
public interface ICueDevice
{
/// <summary>
/// Gets generic information provided by CUE for the device.
/// </summary>
IDeviceInfo DeviceInfo { get; }
/// <summary>
/// Gets or sets the update-mode for the device.
/// </summary>
UpdateMode UpdateMode { get; set; }
/// <summary>
/// Gets or sets the update-frequency in seconds. (Calculate by using '1f / updates per second')
/// </summary>
float UpdateFrequency { get; set; }
/// <summary>
/// Occurs when a catched exception is thrown inside the device.
/// </summary>
event OnExceptionEventHandler OnException;
/// <summary>
/// Perform an update for all dirty keys, or all keys if flushLeds is set to true.
/// </summary>
/// <param name="flushLeds">Specifies whether all keys (including clean ones) should be updated.</param>
void Update(bool flushLeds = false);
}
}
+4 -4
View File
@@ -5,17 +5,17 @@ namespace CUE.NET.Devices
public interface IDeviceInfo
{
/// <summary>
/// Device type
/// Gets the device type.
/// </summary>
CorsairDeviceType Type { get; }
/// <summary>
/// Device model (like “K95RGB”).
/// Gets the device model (like “K95RGB”).
/// </summary>
string Model { get; }
/// <summary>
/// Flags that describes device capabilities
/// Gets flags, which describe device capabilities.
/// </summary>
CorsairDeviceCaps CapsMask { get; }
}
+26
View File
@@ -12,12 +12,21 @@ using CUE.NET.Exceptions;
namespace CUE.NET.Devices.Mouse
{
/// <summary>
/// Represents the SDK for a corsair mouse.
/// </summary>
public class CorsairMouse : AbstractCueDevice, IEnumerable<CorsairLed>
{
#region Properties & Fields
#region Indexer
/// <summary>
/// Gets the <see cref="CorsairLed" /> with the specified ID.
/// </summary>
/// <param name="ledId">The ID of the LED to get.</param>
/// <returns>The LED with the specified ID.</returns>
/// <exception cref="System.ArgumentNullException" accessor="get"><paramref name="ledId" /> is null.</exception>
public CorsairLed this[CorsairMouseLedId ledId]
{
get
@@ -29,16 +38,29 @@ namespace CUE.NET.Devices.Mouse
#endregion
/// <summary>
/// Gets specific information provided by CUE for the mouse.
/// </summary>
public CorsairMouseDeviceInfo MouseDeviceInfo { get; }
/// <summary>
/// Indicates if the mouse has an active effect to deal with.
/// </summary>
protected override bool HasEffect => false;
/// <summary>
/// Gets a read-only collection containing all LEDs of the mouse.
/// </summary>
public new IEnumerable<CorsairLed> Leds => new ReadOnlyCollection<CorsairLed>(base.Leds.Values.ToList());
#endregion
#region Constructors
/// <summary>
/// Initializes a new instance of the <see cref="CorsairMouse"/> class.
/// </summary>
/// <param name="info">The specific information provided by CUE for the mouse</param>
internal CorsairMouse(CorsairMouseDeviceInfo info)
: base(info)
{
@@ -80,6 +102,10 @@ namespace CUE.NET.Devices.Mouse
#region IEnumerable
/// <summary>
/// Returns an enumerator that iterates over all LEDs of the mouse.
/// </summary>
/// <returns>An enumerator for all LDS of the mouse.</returns>
public IEnumerator<CorsairLed> GetEnumerator()
{
return Leds.GetEnumerator();
+3 -3
View File
@@ -8,7 +8,7 @@ using CUE.NET.Native;
namespace CUE.NET.Devices.Mouse
{
/// <summary>
/// Stub for planned headset-support.
/// Represents specific information for a CUE mouse.
/// </summary>
public class CorsairMouseDeviceInfo : GenericDeviceInfo
{
@@ -24,9 +24,9 @@ namespace CUE.NET.Devices.Mouse
#region Constructors
/// <summary>
/// Internal constructor of managed CorsairDeviceInfo.
/// Internal constructor of managed <see cref="CorsairMouseDeviceInfo" />.
/// </summary>
/// <param name="nativeInfo">The native CorsairDeviceInfo-struct</param>
/// <param name="nativeInfo">The native <see cref="_CorsairDeviceInfo" />-struct</param>
internal CorsairMouseDeviceInfo(_CorsairDeviceInfo nativeInfo)
: base(nativeInfo)
{
@@ -3,6 +3,9 @@
namespace CUE.NET.Devices.Mouse.Enums
{
/// <summary>
/// Contains list of all LEDs available for corsair mice.
/// </summary>
public enum CorsairMouseLedId
{
Invalid = 0,