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
2ca0c69
... +5 ...
a348d6f
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
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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | } |
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 | 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; |
Files | Coverage |
---|---|
src/Colore | 61.90% |
Project Totals (75 files) | 61.90% |
a348d6f
d27090f
aa08fe1
91d4d9f
601f784
e89e8d5
2ca0c69