-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #60 from CoraleStudios/hotfix/interface-deprecatio…
…n-issue Add methods for deprecation to obsolete interfaces.
- Loading branch information
Showing
24 changed files
with
846 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
// --------------------------------------------------------------------------------------- | ||
// <copyright file="Device.Obsoletes.cs" company="Corale"> | ||
// Copyright © 2015 by Adam Hellberg and Brandon Scott. | ||
// | ||
// Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
// this software and associated documentation files (the "Software"), to deal in | ||
// the Software without restriction, including without limitation the rights to | ||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies | ||
// of the Software, and to permit persons to whom the Software is furnished to do | ||
// so, subject to the following conditions: | ||
// | ||
// The above copyright notice and this permission notice shall be included in all | ||
// copies or substantial portions of the Software. | ||
// | ||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
// | ||
// Disclaimer: Corale and/or Colore is in no way affiliated with Razer and/or any | ||
// of its employees and/or licensors. Corale, Adam Hellberg, and/or Brandon Scott | ||
// do not take responsibility for any harm caused, direct or indirect, to any | ||
// Razer peripherals via the use of Colore. | ||
// | ||
// "Razer" is a trademark of Razer USA Ltd. | ||
// </copyright> | ||
// --------------------------------------------------------------------------------------- | ||
|
||
namespace Corale.Colore.Core | ||
{ | ||
using System; | ||
|
||
/// <summary> | ||
/// Base class for devices, containing code common between all devices. | ||
/// </summary> | ||
public abstract partial class Device | ||
{ | ||
/// <summary> | ||
/// Sets the color of all components on this device. | ||
/// </summary> | ||
/// <param name="color">Color to set.</param> | ||
[Obsolete("Set is deprecated, please use SetAll(Effect).", false)] | ||
public abstract void Set(Color color); | ||
|
||
/// <summary> | ||
/// Updates the device to use the effect pointed to by the specified GUID. | ||
/// </summary> | ||
/// <param name="guid">GUID to set.</param> | ||
[Obsolete("Set is deprecated, please use SetGuid(Guid).", false)] | ||
public void Set(Guid guid) | ||
{ | ||
SetGuid(guid); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
// --------------------------------------------------------------------------------------- | ||
// <copyright file="GenericDevice.Obsoletes.cs" company="Corale"> | ||
// Copyright © 2015 by Adam Hellberg and Brandon Scott. | ||
// | ||
// Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
// this software and associated documentation files (the "Software"), to deal in | ||
// the Software without restriction, including without limitation the rights to | ||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies | ||
// of the Software, and to permit persons to whom the Software is furnished to do | ||
// so, subject to the following conditions: | ||
// | ||
// The above copyright notice and this permission notice shall be included in all | ||
// copies or substantial portions of the Software. | ||
// | ||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
// | ||
// Disclaimer: Corale and/or Colore is in no way affiliated with Razer and/or any | ||
// of its employees and/or licensors. Corale, Adam Hellberg, and/or Brandon Scott | ||
// do not take responsibility for any harm caused, direct or indirect, to any | ||
// Razer peripherals via the use of Colore. | ||
// | ||
// "Razer" is a trademark of Razer USA Ltd. | ||
// </copyright> | ||
// --------------------------------------------------------------------------------------- | ||
|
||
namespace Corale.Colore.Core | ||
{ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Runtime.InteropServices; | ||
using Corale.Colore.Annotations; | ||
using Corale.Colore.Razer; | ||
using log4net; | ||
|
||
/// <summary> | ||
/// A generic device. | ||
/// </summary> | ||
public sealed partial class GenericDevice | ||
{ | ||
/// <summary> | ||
/// Sets the color of all components on this device. | ||
/// </summary> | ||
/// <param name="color">Color to set.</param> | ||
[Obsolete("Set is deprecated, please use SetAll(Effect).", false)] | ||
public override void Set(Color color) | ||
{ | ||
SetAll(color); | ||
} | ||
|
||
/// <summary> | ||
/// Sets a parameter-less effect on this device. | ||
/// </summary> | ||
/// <param name="effect">Effect to set.</param> | ||
[Obsolete("Set is deprecated, please use SetEffect(Effect).", false)] | ||
public void Set(Effect effect) | ||
{ | ||
SetEffect(effect, IntPtr.Zero); | ||
} | ||
|
||
/// <summary> | ||
/// Sets an effect on this device, taking a parameter. | ||
/// </summary> | ||
/// <param name="effect">Effect to set.</param> | ||
/// <param name="param">Effect-specific parameter to use.</param> | ||
[Obsolete("Set is deprecated, please use SetEffect(Effect, IntPtr).", false)] | ||
public void Set(Effect effect, IntPtr param) | ||
{ | ||
SetGuid(NativeWrapper.CreateEffect(DeviceId, effect, param)); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
// --------------------------------------------------------------------------------------- | ||
// <copyright file="IDevice.Obsoletes.cs" company="Corale"> | ||
// Copyright © 2015 by Adam Hellberg and Brandon Scott. | ||
// | ||
// Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
// this software and associated documentation files (the "Software"), to deal in | ||
// the Software without restriction, including without limitation the rights to | ||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies | ||
// of the Software, and to permit persons to whom the Software is furnished to do | ||
// so, subject to the following conditions: | ||
// | ||
// The above copyright notice and this permission notice shall be included in all | ||
// copies or substantial portions of the Software. | ||
// | ||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
// | ||
// Disclaimer: Corale and/or Colore is in no way affiliated with Razer and/or any | ||
// of its employees and/or licensors. Corale, Adam Hellberg, and/or Brandon Scott | ||
// do not take responsibility for any harm caused, direct or indirect, to any | ||
// Razer peripherals via the use of Colore. | ||
// | ||
// "Razer" is a trademark of Razer USA Ltd. | ||
// </copyright> | ||
// --------------------------------------------------------------------------------------- | ||
|
||
namespace Corale.Colore.Core | ||
{ | ||
using System; | ||
using Corale.Colore.Annotations; | ||
|
||
/// <summary> | ||
/// Interface for functionality common with all devices. | ||
/// </summary> | ||
public partial interface IDevice | ||
{ | ||
/// <summary> | ||
/// Sets the color of all components on this device. | ||
/// </summary> | ||
/// <param name="color">Color to set.</param> | ||
[Obsolete("Set is deprecated, please use SetAll(Color).", false)] | ||
[PublicAPI] | ||
void Set(Color color); | ||
|
||
/// <summary> | ||
/// Updates the device to use the effect pointed to by the specified GUID. | ||
/// </summary> | ||
/// <param name="guid">GUID to set.</param> | ||
[Obsolete("Set is deprecated, please use SetGuid(Guid).", false)] | ||
[PublicAPI] | ||
void Set(Guid guid); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
// --------------------------------------------------------------------------------------- | ||
// <copyright file="IGenericDevice.Obsoletes.cs" company="Corale"> | ||
// Copyright © 2015 by Adam Hellberg and Brandon Scott. | ||
// | ||
// Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
// this software and associated documentation files (the "Software"), to deal in | ||
// the Software without restriction, including without limitation the rights to | ||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies | ||
// of the Software, and to permit persons to whom the Software is furnished to do | ||
// so, subject to the following conditions: | ||
// | ||
// The above copyright notice and this permission notice shall be included in all | ||
// copies or substantial portions of the Software. | ||
// | ||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
// | ||
// Disclaimer: Corale and/or Colore is in no way affiliated with Razer and/or any | ||
// of its employees and/or licensors. Corale, Adam Hellberg, and/or Brandon Scott | ||
// do not take responsibility for any harm caused, direct or indirect, to any | ||
// Razer peripherals via the use of Colore. | ||
// | ||
// "Razer" is a trademark of Razer USA Ltd. | ||
// </copyright> | ||
// --------------------------------------------------------------------------------------- | ||
|
||
namespace Corale.Colore.Core | ||
{ | ||
using System; | ||
using Corale.Colore.Razer; | ||
|
||
/// <summary> | ||
/// Interface for generic devices. | ||
/// </summary> | ||
public partial interface IGenericDevice | ||
{ | ||
/// <summary> | ||
/// Sets a parameter-less effect on this device. | ||
/// </summary> | ||
/// <param name="effect">Effect to set.</param> | ||
void Set(Effect effect); | ||
|
||
/// <summary> | ||
/// Sets an effect on this device, taking a parameter. | ||
/// </summary> | ||
/// <param name="effect">Effect to set.</param> | ||
/// <param name="param">Effect-specific parameter to use.</param> | ||
void Set(Effect effect, IntPtr param); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
// --------------------------------------------------------------------------------------- | ||
// <copyright file="IHeadset.Obsoletes.cs" company="Corale"> | ||
// Copyright © 2015 by Adam Hellberg and Brandon Scott. | ||
// | ||
// Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
// this software and associated documentation files (the "Software"), to deal in | ||
// the Software without restriction, including without limitation the rights to | ||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies | ||
// of the Software, and to permit persons to whom the Software is furnished to do | ||
// so, subject to the following conditions: | ||
// | ||
// The above copyright notice and this permission notice shall be included in all | ||
// copies or substantial portions of the Software. | ||
// | ||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
// | ||
// Disclaimer: Corale and/or Colore is in no way affiliated with Razer and/or any | ||
// of its employees and/or licensors. Corale, Adam Hellberg, and/or Brandon Scott | ||
// do not take responsibility for any harm caused, direct or indirect, to any | ||
// Razer peripherals via the use of Colore. | ||
// | ||
// "Razer" is a trademark of Razer USA Ltd. | ||
// </copyright> | ||
// --------------------------------------------------------------------------------------- | ||
|
||
namespace Corale.Colore.Core | ||
{ | ||
using System; | ||
using Corale.Colore.Razer.Headset.Effects; | ||
|
||
/// <summary> | ||
/// Interface for headset functionality. | ||
/// </summary> | ||
public partial interface IHeadset : IDevice | ||
{ | ||
/// <summary> | ||
/// Sets an effect on the headset that doesn't | ||
/// take any parameters, currently only valid | ||
/// for the <see cref="Effect.SpectrumCycling" /> effect. | ||
/// </summary> | ||
/// <param name="effect">The type of effect to set.</param> | ||
[Obsolete("Set is deprecated, please use SetEffect(Effect).", false)] | ||
void Set(Effect effect); | ||
|
||
/// <summary> | ||
/// Sets a new static effect on the headset. | ||
/// </summary> | ||
/// <param name="effect"> | ||
/// An instance of the <see cref="Static" /> struct | ||
/// describing the effect. | ||
/// </param> | ||
[Obsolete("Set is deprecated, please use SetStatic(Static).", false)] | ||
void Set(Static effect); | ||
|
||
/// <summary> | ||
/// Sets a new breathing effect on the headset. | ||
/// </summary> | ||
/// <param name="effect"> | ||
/// An instance of the <see cref="Breathing" /> struct | ||
/// describing the effect. | ||
/// </param> | ||
[Obsolete("Set is deprecated, please use SetBreathing(Breathing).", false)] | ||
void Set(Breathing effect); | ||
} | ||
} |
Oops, something went wrong.
16c9b0a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TeamCity Colore :: Release Build Build 78 is now running
16c9b0a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TeamCity Colore :: Release Build Build 2.2.1.78 outcome was SUCCESS
Summary: Tests passed: 111 Build time: 0:3:26
16c9b0a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TeamCity Colore :: Release Build Build 79 is now running
16c9b0a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TeamCity Colore :: Release Build Build 79 outcome was SUCCESS
Summary: Skipping master branch Build time: 0:0:4