chroma-sdk / Colore

Compare 2ca0c69 ... +4 ... d27090f

Coverage Reach
Effects/Keyboard/ExtendedCustomKeyboardEffect.cs Effects/Keyboard/CustomKeyboardEffect.cs Effects/Keyboard/DeathstalkerGridEffect.cs Effects/Keyboard/PositionData.cs Effects/Keyboard/StaticKeyboardEffect.cs Effects/Mouse/CustomMouseEffect.cs Effects/Mouse/StaticMouseEffect.cs Effects/Keypad/CustomKeypadEffect.cs Effects/Keypad/StaticKeypadEffect.cs Effects/ChromaLink/CustomChromaLinkEffect.cs Effects/ChromaLink/StaticChromaLinkEffect.cs Effects/Headset/CustomHeadsetEffect.cs Effects/Headset/StaticHeadsetEffect.cs Effects/Mousepad/CustomMousepadEffect.cs Effects/Mousepad/StaticMousepadEffect.cs Effects/Generic/NoneEffect.cs Data/Result.cs Data/Devices.cs Data/AppInfo.cs Data/Color.cs Data/SdkVersion.cs Data/Author.cs Data/DeviceInfo.cs Data/SdkDeviceInfo.cs Data/Color.Defines.cs Native/NativeApi.cs Native/NativeSdkMethods.cs Native/NativeCallException.cs Serialization/ResultConverter.cs Serialization/ColorConverter.cs Serialization/KeyboardExtendedCustomConverter.cs Serialization/MouseStaticConverter.cs Serialization/ChromaLinkStaticConverter.cs Serialization/ChromaLinkCustomConverter.cs Serialization/KeypadCustomConverter.cs Serialization/DeathstalkerGridConverter.cs Serialization/KeyboardCustomConverter.cs Serialization/MouseCustomConverter.cs Serialization/HeadsetStaticConverter.cs Serialization/MousepadCustomConverter.cs Serialization/KeyboardStaticConverter.cs Serialization/MousepadStaticConverter.cs Serialization/KeypadStaticConverter.cs Serialization/HeadsetCustomConverter.cs Implementations/ChromaImplementation.cs Implementations/KeyboardImplementation.cs Implementations/MouseImplementation.cs Implementations/KeypadImplementation.cs Implementations/ChromaLinkImplementation.cs Implementations/MousepadImplementation.cs Implementations/HeadsetImplementation.cs Implementations/GenericDeviceImplementation.cs Implementations/DeviceImplementation.cs Rest/RestApi.cs Rest/RestException.cs Rest/Data/SdkInitResponse.cs Rest/Data/SdkResponse.cs Rest/Data/EffectData.cs Rest/Data/HeartbeatResponse.cs Rest/Data/SdkEffectResponse.cs Rest/Data/EffectGroup.cs Rest/RestClient.cs Rest/RestResponse.cs Helpers/RegistryHelper.cs Helpers/UriHelper.cs Helpers/ArrayHelper.cs Helpers/EnvironmentHelper.cs Helpers/TaskHelper.cs Api/ApiException.cs UnsupportedDeviceException.cs Events/ApplicationStateEventArgs.cs Events/SdkSupportEventArgs.cs Events/DeviceAccessEventArgs.cs ColoreException.cs ColoreProvider.cs

No flags found

Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.

e.g., #unittest #integration

#production #enterprise

#frontend #backend

Learn more about Codecov Flags here.

Showing 32 of 34 files from the diff.
Other files ignored by Codecov

@@ -71,7 +71,10 @@
Loading
71 71
        {
72 72
            var result = _nativeSdkMethods.Init();
73 73
            if (!result)
74 +
            {
74 75
                throw new NativeCallException("Init", result);
76 +
            }
77 +
75 78
            return TaskHelper.CompletedTask;
76 79
        }
77 80
@@ -83,7 +86,9 @@
Loading
83 86
        {
84 87
            var result = _nativeSdkMethods.UnInit();
85 88
            if (!result)
89 +
            {
86 90
                throw new NativeCallException("UnInit", result);
91 +
            }
87 92
88 93
            return TaskHelper.CompletedTask;
89 94
        }
@@ -113,7 +118,9 @@
Loading
113 118
                }
114 119
115 120
                if (ptr == IntPtr.Zero)
121 +
                {
116 122
                    throw new ColoreException("Device query failed, ptr NULL.");
123 +
                }
117 124
118 125
                var info = Marshal.PtrToStructure<SdkDeviceInfo>(ptr);
119 126
@@ -134,12 +141,18 @@
Loading
134 141
        {
135 142
            var result = _nativeSdkMethods.SetEffect(effectId);
136 143
            if (result)
144 +
            {
137 145
                return TaskHelper.CompletedTask;
146 +
            }
138 147
139 148
            if (result == Result.RzResourceDisabled || result == Result.RzAccessDenied)
149 +
            {
140 150
                Log.WarnFormat("Ambiguous {0} error thrown from call to native function SetEffect.", result);
151 +
            }
141 152
            else
153 +
            {
142 154
                throw new NativeCallException("SetEffect", result);
155 +
            }
143 156
144 157
            return TaskHelper.CompletedTask;
145 158
        }
@@ -153,7 +166,10 @@
Loading
153 166
        {
154 167
            var result = _nativeSdkMethods.DeleteEffect(effectId);
155 168
            if (!result)
169 +
            {
156 170
                throw new NativeCallException("DeleteEffect", result);
171 +
            }
172 +
157 173
            return TaskHelper.CompletedTask;
158 174
        }
159 175
@@ -404,7 +420,9 @@
Loading
404 420
        {
405 421
            var result = _nativeSdkMethods.RegisterEventNotification(hwnd);
406 422
            if (!result)
423 +
            {
407 424
                throw new NativeCallException("RegisterEventNotification", result);
425 +
            }
408 426
        }
409 427
410 428
        /// <inheritdoc />
@@ -415,7 +433,9 @@
Loading
415 433
        {
416 434
            var result = _nativeSdkMethods.UnregisterEventNotification();
417 435
            if (!result)
436 +
            {
418 437
                throw new NativeCallException("UnregisterEventNotification", result);
438 +
            }
419 439
        }
420 440
421 441
        /// <summary>
@@ -430,8 +450,12 @@
Loading
430 450
        {
431 451
            var guid = Guid.Empty;
432 452
            var result = _nativeSdkMethods.CreateEffect(device, effectType, param, ref guid);
453 +
433 454
            if (!result)
455 +
            {
434 456
                throw new NativeCallException("CreateEffect", result);
457 +
            }
458 +
435 459
            return guid;
436 460
        }
437 461
@@ -446,8 +470,12 @@
Loading
446 470
        {
447 471
            var guid = Guid.Empty;
448 472
            var result = _nativeSdkMethods.CreateKeyboardEffect(effectType, param, ref guid);
473 +
449 474
            if (!result)
475 +
            {
450 476
                throw new NativeCallException("CreateKeyboardEffect", result);
477 +
            }
478 +
451 479
            return guid;
452 480
        }
453 481
@@ -462,8 +490,12 @@
Loading
462 490
        {
463 491
            var guid = Guid.Empty;
464 492
            var result = _nativeSdkMethods.CreateMouseEffect(effectType, param, ref guid);
493 +
465 494
            if (!result)
495 +
            {
466 496
                throw new NativeCallException("CreateMouseEffect", result);
497 +
            }
498 +
467 499
            return guid;
468 500
        }
469 501
@@ -477,8 +509,12 @@
Loading
477 509
        {
478 510
            var guid = Guid.Empty;
479 511
            var result = _nativeSdkMethods.CreateHeadsetEffect(effectType, param, ref guid);
512 +
480 513
            if (!result)
514 +
            {
481 515
                throw new NativeCallException("CreateHeadsetEffect", result);
516 +
            }
517 +
482 518
            return guid;
483 519
        }
484 520
@@ -492,8 +528,12 @@
Loading
492 528
        {
493 529
            var guid = Guid.Empty;
494 530
            var result = _nativeSdkMethods.CreateMousepadEffect(effectType, param, ref guid);
531 +
495 532
            if (!result)
533 +
            {
496 534
                throw new NativeCallException("CreateMousepadEffect", result);
535 +
            }
536 +
497 537
            return guid;
498 538
        }
499 539
@@ -507,8 +547,12 @@
Loading
507 547
        {
508 548
            var guid = Guid.Empty;
509 549
            var result = _nativeSdkMethods.CreateKeypadEffect(effectType, param, ref guid);
550 +
510 551
            if (!result)
552 +
            {
511 553
                throw new NativeCallException("CreateKeypadEffect", result);
554 +
            }
555 +
512 556
            return guid;
513 557
        }
514 558
@@ -522,8 +566,12 @@
Loading
522 566
        {
523 567
            var guid = Guid.Empty;
524 568
            var result = _nativeSdkMethods.CreateChromaLinkEffect(effectType, param, ref guid);
569 +
525 570
            if (!result)
571 +
            {
526 572
                throw new NativeCallException("CreateChromaLinkEffect", result);
573 +
            }
574 +
527 575
            return guid;
528 576
        }
529 577
    }

@@ -311,7 +311,9 @@
Loading
311 311
        public override bool Equals(object? obj)
312 312
        {
313 313
            if (obj is null)
314 +
            {
314 315
                return false;
316 +
            }
315 317
316 318
            return obj is ExtendedCustomKeyboardEffect custom && Equals(custom);
317 319
        }

@@ -226,7 +226,9 @@
Loading
226 226
        public override bool Equals(object? other)
227 227
        {
228 228
            if (other is null)
229 +
            {
229 230
                return false;
231 +
            }
230 232
231 233
            switch (other)
232 234
            {

@@ -214,7 +214,9 @@
Loading
214 214
        public override bool Equals(object? obj)
215 215
        {
216 216
            if (obj is null)
217 +
            {
217 218
                return false;
219 +
            }
218 220
219 221
            return obj is DeathstalkerGridEffect custom && Equals(custom);
220 222
        }
@@ -233,7 +235,9 @@
Loading
233 235
            for (var index = 0; index < KeyboardConstants.MaxKeys; index++)
234 236
            {
235 237
                if (_colors[index] != other._colors[index])
238 +
                {
236 239
                    return false;
240 +
                }
237 241
            }
238 242
239 243
            return true;

@@ -107,7 +107,9 @@
Loading
107 107
        public override bool Equals(object? obj)
108 108
        {
109 109
            if (obj is null)
110 +
            {
110 111
                return false;
112 +
            }
111 113
112 114
            return obj is StaticHeadsetEffect effect && Equals(effect);
113 115
        }

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Click to load this diff.
Loading diff...

Everything is accounted for!

No changes detected that need to be reviewed.
What changes does Codecov check for?
Lines, not adjusted in diff, that have changed coverage data.
Files that introduced coverage data that had none before.
Files that have missing coverage data that once were tracked.
Files Coverage
src/Colore 61.90%
Project Totals (75 files) 61.90%
Loading