• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

MorganKryze / ConsoleAppVisuals / 7468304197

09 Jan 2024 11:52PM UTC coverage: 26.921% (+11.7%) from 15.177%
7468304197

push

github

MorganKryze
🚑 (window) 37% new try

391 of 1492 branches covered (0.0%)

Branch coverage included in aggregate %.

1 of 1 new or added line in 1 file covered. (100.0%)

141 existing lines in 1 file now uncovered.

695 of 2542 relevant lines covered (27.34%)

44.15 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

34.34
/src/ConsoleAppVisuals/Window.cs
1
/*
2
    MIT License 2023 MorganKryze
3
    For full license information, please visit: https://github.com/MorganKryze/ConsoleAppVisuals/blob/main/LICENSE
4
*/
5
namespace ConsoleAppVisuals;
6

7
/// <summary>
8
/// The major class of the library. The window is used to collect the elements of the console and draw them.
9
/// </summary>
10
/// <remarks>
11
/// For more information, refer to the following resources:
12
/// <list type="bullet">
13
/// <item><description><a href="https://morgankryze.github.io/ConsoleAppVisuals/">Documentation</a></description></item>
14
/// <item><description><a href="https://github.com/MorganKryze/ConsoleAppVisuals/blob/main/example/Program.cs">Example Project</a></description></item>
15
/// </list>
16
/// </remarks>
17
public static class Window
18
{
19
    #region Setup
20
    /// <summary>
21
    /// This method sets up the window without the need to call it.
22
    /// </summary>
23
    [ExcludeFromCodeCoverage]
24
    static Window()
25
    {
26
        Console.Clear();
27
        Console.CursorVisible = false;
28
    }
29
    #endregion
30

31
    #region Fields: s_elements
32
    private static readonly List<Element> s_elements = new();
33
    #endregion
34

35
    #region Constants: DefaultVisibility
36
    /// <summary>
37
    /// The default visibility of the elements when they are added to the window.
38
    /// </summary>
39
    public const bool DEFAULT_VISIBILITY = false;
40
    #endregion
41

42
    #region Properties: NextId, NumberOfElements
43
    /// <summary>
44
    /// Gives the next id number each time a new element is added to the window.
45
    /// </summary>
46
    public static int NextId => s_elements.Count;
84✔
47

48
    /// <summary>
49
    /// Gives the number of elements in the window.
50
    /// </summary>
51
    public static int CountElements => s_elements.Count;
15✔
52

53
    /// <summary>
54
    /// Gives the list of elements in the window.
55
    /// </summary>
56
    public static List<Element> Elements => s_elements;
6✔
57
    #endregion
58

59
    #region Basic Methods: Get, Add, Insert, Remove, RemoveAll
60
    /// <summary>
61
    /// This method returns the first element of the given type.
62
    /// </summary>
63
    /// <typeparam name="T">The type of the element.</typeparam>
64
    /// <returns>The element with the given type if it exists, null otherwise.</returns>
65
    /// <remarks>
66
    /// For more information, refer to the following resources:
67
    /// <list type="bullet">
68
    /// <item><description><a href="https://morgankryze.github.io/ConsoleAppVisuals/">Documentation</a></description></item>
69
    /// <item><description><a href="https://github.com/MorganKryze/ConsoleAppVisuals/blob/main/example/Program.cs">Example Project</a></description></item>
70
    /// </list>
71
    /// </remarks>
72
    public static T? GetElement<T>()
73
        where T : Element
74
    {
75
        return s_elements.Find(element => element.GetType() == typeof(T)) as T;
36✔
76
    }
77

78
    /// <summary>
79
    /// This method returns the element with the given id.
80
    /// </summary>
81
    /// <param name="id">The id of the element.</param>
82
    /// <returns>The element with the given id if it exists, null otherwise.</returns>
83
    /// <exception cref="ArgumentOutOfRangeException">Thrown when the id is out of range.</exception>
84
    /// <remarks>
85
    /// For more information, refer to the following resources:
86
    /// <list type="bullet">
87
    /// <item><description><a href="https://morgankryze.github.io/ConsoleAppVisuals/">Documentation</a></description></item>
88
    /// <item><description><a href="https://github.com/MorganKryze/ConsoleAppVisuals/blob/main/example/Program.cs">Example Project</a></description></item>
89
    /// </list>
90
    /// </remarks>
91
    public static T? GetElement<T>(int id)
92
        where T : Element
93
    {
94
        if (id < 0 || id >= s_elements.Count)
15✔
95
        {
96
            throw new ArgumentOutOfRangeException(nameof(id), "Invalid element ID.");
6✔
97
        }
98
        return (T)s_elements[id];
9✔
99
    }
100

101
    /// <summary>
102
    /// This method returns the first visible element with the given type.
103
    /// </summary>
104
    /// <typeparam name="T">The type of the element.</typeparam>
105
    /// <returns>The visible element with the given type if it exists, null otherwise.</returns>
106
    /// <remarks>
107
    /// For more information, refer to the following resources:
108
    /// <list type="bullet">
109
    /// <item><description><a href="https://morgankryze.github.io/ConsoleAppVisuals/">Documentation</a></description></item>
110
    /// <item><description><a href="https://github.com/MorganKryze/ConsoleAppVisuals/blob/main/example/Program.cs">Example Project</a></description></item>
111
    /// </list>
112
    /// </remarks>
113
    public static T? GetVisibleElement<T>()
114
        where T : Element
115
    {
116
        return s_elements.Find(element => element.GetType() == typeof(T) && element.Visibility)
12✔
117
            as T;
6✔
118
    }
119

120
    /// <summary>
121
    /// This method adds an element to the window.
122
    /// </summary>
123
    /// <param name="element">The element to be added.</param>
124
    /// <remarks>
125
    /// For more information, refer to the following resources:
126
    /// <list type="bullet">
127
    /// <item><description><a href="https://morgankryze.github.io/ConsoleAppVisuals/">Documentation</a></description></item>
128
    /// <item><description><a href="https://github.com/MorganKryze/ConsoleAppVisuals/blob/main/example/Program.cs">Example Project</a></description></item>
129
    /// </list>
130
    /// </remarks>
131
    public static void AddElement(Element element)
132
    {
133
        s_elements.Add(element);
66✔
134
        if (!element.IsInteractive && AllowVisibilityToggle(element.Id))
66✔
135
        {
136
            element.ToggleVisibility();
6✔
137
        }
138
    }
66✔
139

140
    /// <summary>
141
    /// This method inserts an element to the window at the given id.
142
    /// </summary>
143
    /// <param name="element">The element to be inserted.</param>
144
    /// <param name="id">The id of the element.</param>
145
    /// <exception cref="ArgumentOutOfRangeException">Thrown when the id is out of range.</exception>
146
    /// <remarks>
147
    /// For more information, refer to the following resources:
148
    /// <list type="bullet">
149
    /// <item><description><a href="https://morgankryze.github.io/ConsoleAppVisuals/">Documentation</a></description></item>
150
    /// <item><description><a href="https://github.com/MorganKryze/ConsoleAppVisuals/blob/main/example/Program.cs">Example Project</a></description></item>
151
    /// </list>
152
    /// </remarks>
153
    public static void InsertElement(Element element, int id)
154
    {
155
        if (id < 0 || id > s_elements.Count)
9✔
156
        {
157
            throw new ArgumentOutOfRangeException(nameof(id), "Invalid element ID.");
6✔
158
        }
159
        s_elements.Insert(id, element);
3✔
160
    }
3✔
161

162
    /// <summary>
163
    /// This method removes the element with the given id.
164
    /// </summary>
165
    /// <param name="id">The id of the element.</param>
166
    /// <exception cref="ArgumentOutOfRangeException">Thrown when the id is out of range.</exception>
167
    /// <remarks>
168
    /// For more information, refer to the following resources:
169
    /// <list type="bullet">
170
    /// <item><description><a href="https://morgankryze.github.io/ConsoleAppVisuals/">Documentation</a></description></item>
171
    /// <item><description><a href="https://github.com/MorganKryze/ConsoleAppVisuals/blob/main/example/Program.cs">Example Project</a></description></item>
172
    /// </list>
173
    /// </remarks>
174
    public static void RemoveElement(int id)
175
    {
176
        if (id < 0 || id >= s_elements.Count)
9✔
177
        {
178
            throw new ArgumentOutOfRangeException(nameof(id), "Invalid element ID.");
6✔
179
        }
180
        s_elements.RemoveAt(id);
3✔
181
        UpdateIDs();
3✔
182
    }
3✔
183

184
    /// <summary>
185
    /// This method removes the given element.
186
    /// </summary>
187
    /// <param name="element">The element to be removed.</param>
188
    /// <exception cref="ElementNotFoundException">Thrown when the element is invalid.</exception>
189
    /// <returns>True if the element is successfully removed, false otherwise.</returns>
190
    /// <remarks>
191
    /// For more information, refer to the following resources:
192
    /// <list type="bullet">
193
    /// <item><description><a href="https://morgankryze.github.io/ConsoleAppVisuals/">Documentation</a></description></item>
194
    /// <item><description><a href="https://github.com/MorganKryze/ConsoleAppVisuals/blob/main/example/Program.cs">Example Project</a></description></item>
195
    /// </list>
196
    /// </remarks>
197
    public static bool RemoveElement(Element element)
198
    {
199
        if (!s_elements.Contains(element))
6✔
200
        {
201
            throw new ElementNotFoundException("Invalid element. Not found in the window.");
3✔
202
        }
203
        var state = s_elements.Remove(element);
3✔
204
        UpdateIDs();
3✔
205
        return state;
3✔
206
    }
207

208
    /// <summary>
209
    /// This method removes the first element with the given type.
210
    /// </summary>
211
    /// <typeparam name="T">The type of the element.</typeparam>
212
    /// <exception cref="ElementNotFoundException">Thrown when the element is invalid.</exception>
213
    /// <returns>True if the element is successfully removed, false otherwise.</returns>
214
    /// <remarks>
215
    /// For more information, refer to the following resources:
216
    /// <list type="bullet">
217
    /// <item><description><a href="https://morgankryze.github.io/ConsoleAppVisuals/">Documentation</a></description></item>
218
    /// <item><description><a href="https://github.com/MorganKryze/ConsoleAppVisuals/blob/main/example/Program.cs">Example Project</a></description></item>
219
    /// </list>
220
    /// </remarks>
221
    public static bool RemoveElement<T>()
222
        where T : Element
223
    {
224
        var element =
6✔
225
            GetElement<T>()
6✔
226
            ?? throw new ElementNotFoundException("Invalid element. Not found in the window.");
6✔
227
        var state = s_elements.Remove(element);
3✔
228
        UpdateIDs();
3✔
229
        return state;
3✔
230
    }
231

232
    /// <summary>
233
    /// This method removes the first element with the given type created by the library itself.
234
    /// </summary>
235
    /// <typeparam name="T">The type of the element.</typeparam>
236
    /// <exception cref="ElementNotFoundException">Thrown when the element is invalid.</exception>
237
    /// <exception cref="InvalidOperationException">Thrown when the element is not created by the library.</exception>
238
    /// <returns>True if the element is successfully removed, false otherwise.</returns>
239
    /// <remarks>
240
    /// For more information, refer to the following resources:
241
    /// <list type="bullet">
242
    /// <item><description><a href="https://morgankryze.github.io/ConsoleAppVisuals/">Documentation</a></description></item>
243
    /// <item><description><a href="https://github.com/MorganKryze/ConsoleAppVisuals/blob/main/example/Program.cs">Example Project</a></description></item>
244
    /// </list>
245
    /// </remarks>
246
    public static bool RemoveLibraryElement<T>()
247
        where T : Element
248
    {
249
        var element =
9✔
250
            GetElement<T>()
9✔
251
            ?? throw new ElementNotFoundException("Invalid element. Not found in the window.");
9✔
252
        if (element.ElementSource == Source.Library)
6✔
253
        {
254
            var state = s_elements.Remove(element);
3✔
255
            UpdateIDs();
3✔
256
            return state;
3✔
257
        }
258
        throw new InvalidOperationException("Invalid element. Not created by the library.");
3✔
259
    }
260

261
    /// <summary>
262
    /// This method removes all elements from the window.
263
    /// </summary>
264
    /// <remarks>
265
    /// For more information, refer to the following resources:
266
    /// <list type="bullet">
267
    /// <item><description><a href="https://morgankryze.github.io/ConsoleAppVisuals/">Documentation</a></description></item>
268
    /// <item><description><a href="https://github.com/MorganKryze/ConsoleAppVisuals/blob/main/example/Program.cs">Example Project</a></description></item>
269
    /// </list>
270
    /// </remarks>
271
    public static void RemoveAllElements()
272
    {
273
        s_elements.Clear();
60✔
274
    }
60✔
275
    #endregion
276

277
    #region Manipulation Methods: ActivateElement, ActivateAllElements, DeactivateElement, DeactivateAllElements
278
    /// <summary>
279
    /// This method attempts to activate the visibility of the element with the given id.
280
    /// </summary>
281
    /// <param name="id">The id of the element.</param>
282
    /// <param name="render">If true, the element will be rendered.</param>
283
    /// <exception cref="ArgumentOutOfRangeException">Thrown when the id is out of range.</exception>
284
    /// <remarks>
285
    /// For more information, refer to the following resources:
286
    /// <list type="bullet">
287
    /// <item><description><a href="https://morgankryze.github.io/ConsoleAppVisuals/">Documentation</a></description></item>
288
    /// <item><description><a href="https://github.com/MorganKryze/ConsoleAppVisuals/blob/main/example/Program.cs">Example Project</a></description></item>
289
    /// </list>
290
    /// </remarks>
291
    [Visual]
292
    public static void ActivateElement(int id, bool render = true)
293
    {
294
        if (id < 0 || id >= s_elements.Count)
295
        {
296
            throw new ArgumentOutOfRangeException(nameof(id), "Invalid element ID.");
297
        }
298
        if (!s_elements[id].Visibility)
299
        {
300
            s_elements[id].ToggleVisibility();
301
        }
302
        if (render)
303
        {
304
            s_elements[id].RenderElement();
305
        }
306
    }
307

308
    /// <summary>
309
    /// This method attempts to activate the visibility of the first element of the given type.
310
    /// </summary>
311
    /// <param name="render">If true, the element will be rendered.</param>
312
    /// <typeparam name="T">The type of the element.</typeparam>
313
    /// <exception cref="ElementNotFoundException">Thrown when the element is invalid.</exception>
314
    /// <remarks>
315
    /// For more information, refer to the following resources:
316
    /// <list type="bullet">
317
    /// <item><description><a href="https://morgankryze.github.io/ConsoleAppVisuals/">Documentation</a></description></item>
318
    /// <item><description><a href="https://github.com/MorganKryze/ConsoleAppVisuals/blob/main/example/Program.cs">Example Project</a></description></item>
319
    /// </list>
320
    /// </remarks>
321
    [Visual]
322
    public static void ActivateElement<T>(bool render = true)
323
        where T : Element
324
    {
325
        var element =
326
            GetElement<T>()
327
            ?? throw new ElementNotFoundException("Invalid element. Not found in the window.");
328
        if (!element.Visibility)
329
        {
330
            element.ToggleVisibility();
331
        }
332
        if (render)
333
        {
334
            element.RenderElement();
335
        }
336
    }
337

338
    /// <summary>
339
    /// After activating the visibility of an interactive element, this method will return the response for the user.
340
    /// </summary>
341
    /// <param name="clear">If true, the element will be cleared.</param>
342
    /// <typeparam name="T">The type of interactive element.</typeparam>
343
    /// <typeparam name="TResponse">The type of the response (int, string, float...).</typeparam>
344
    /// <returns>The response of the user.</returns>
345
    /// <exception cref="ElementNotFoundException">Thrown when the element is invalid.</exception>
346
    /// <remarks>
347
    /// For more information, refer to the following resources:
348
    /// <list type="bullet">
349
    /// <item><description><a href="https://morgankryze.github.io/ConsoleAppVisuals/">Documentation</a></description></item>
350
    /// <item><description><a href="https://github.com/MorganKryze/ConsoleAppVisuals/blob/main/example/Program.cs">Example Project</a></description></item>
351
    /// </list>
352
    /// </remarks>
353
    [Visual]
354
    public static InteractionEventArgs<TResponse>? GetResponse<T, TResponse>(bool clear = true)
355
        where T : InteractiveElement<TResponse>
356
    {
357
        var element =
358
            GetVisibleElement<T>()
359
            ?? throw new ElementNotFoundException("Invalid element. Not found in the window.");
360
        DeactivateElement<T>(clear);
361
        return element.GetInteractionResponse;
362
    }
363

364
    /// <summary>
365
    /// This method attempts to activate the visibility of all elements.
366
    /// </summary>
367
    /// <remarks>
368
    /// For more information, refer to the following resources:
369
    /// <list type="bullet">
370
    /// <item><description><a href="https://morgankryze.github.io/ConsoleAppVisuals/">Documentation</a></description></item>
371
    /// <item><description><a href="https://github.com/MorganKryze/ConsoleAppVisuals/blob/main/example/Program.cs">Example Project</a></description></item>
372
    /// </list>
373
    /// </remarks>
374
    public static void ActivateAllElements()
375
    {
376
        foreach (var element in s_elements)
12✔
377
        {
378
            if (!element.Visibility)
3✔
379
            {
380
                element.ToggleVisibility();
3✔
381
            }
382
        }
383
    }
3✔
384

385
    /// <summary>
386
    /// This method to deactivate the visibility of the element with the given id.
387
    /// </summary>
388
    /// <param name="id">The id of the element.</param>
389
    /// <param name="clear">If true, the element will be cleared.</param>
390
    /// <exception cref="ArgumentOutOfRangeException">Thrown when the id is out of range.</exception>
391
    /// <remarks>
392
    /// For more information, refer to the following resources:
393
    /// <list type="bullet">
394
    /// <item><description><a href="https://morgankryze.github.io/ConsoleAppVisuals/">Documentation</a></description></item>
395
    /// <item><description><a href="https://github.com/MorganKryze/ConsoleAppVisuals/blob/main/example/Program.cs">Example Project</a></description></item>
396
    /// </list>
397
    /// </remarks>
398
    public static void DeactivateElement(int id, bool clear = true)
399
    {
400
        if (id < 0 || id >= s_elements.Count)
6✔
401
        {
402
            throw new ArgumentOutOfRangeException(nameof(id), "Invalid element ID.");
3✔
403
        }
404
        if (s_elements[id].Visibility)
3✔
405
        {
406
            s_elements[id].ToggleVisibility();
3✔
407
            if (clear)
3✔
408
            {
409
                s_elements[id].Clear();
3✔
410
            }
411
        }
412
        Refresh();
3✔
413
    }
3✔
414

415
    /// <summary>
416
    /// This method deactivate the visibility of the element with the given type.
417
    /// </summary>
418
    /// <param name="element">The element to be deactivated.</param>
419
    /// <param name="clear">If true, the element will be cleared.</param>
420
    /// <exception cref="ElementNotFoundException">Thrown when the element is invalid.</exception>
421
    /// <remarks>
422
    /// For more information, refer to the following resources:
423
    /// <list type="bullet">
424
    /// <item><description><a href="https://morgankryze.github.io/ConsoleAppVisuals/">Documentation</a></description></item>
425
    /// <item><description><a href="https://github.com/MorganKryze/ConsoleAppVisuals/blob/main/example/Program.cs">Example Project</a></description></item>
426
    /// </list>
427
    /// </remarks>
428
    public static void DeactivateElement(Element element, bool clear = true)
429
    {
430
        if (!s_elements.Contains(element))
6✔
431
        {
432
            throw new ElementNotFoundException("Invalid element. Not found in the window.");
3✔
433
        }
434

435
        if (element.Visibility)
3✔
436
        {
437
            element.ToggleVisibility();
3✔
438
            if (clear)
3!
439
            {
UNCOV
440
                element.Clear();
×
441
            }
442
        }
443
    }
3✔
444

445
    /// <summary>
446
    /// This method deactivate the visibility of the first element with the given type.
447
    /// </summary>
448
    /// <param name="clear">If true, the element will be cleared.</param>
449
    /// <typeparam name="T">The type of the element.</typeparam>
450
    /// <exception cref="ElementNotFoundException">Thrown when the element is invalid.</exception>
451
    /// <remarks>
452
    /// For more information, refer to the following resources:
453
    /// <list type="bullet">
454
    /// <item><description><a href="https://morgankryze.github.io/ConsoleAppVisuals/">Documentation</a></description></item>
455
    /// <item><description><a href="https://github.com/MorganKryze/ConsoleAppVisuals/blob/main/example/Program.cs">Example Project</a></description></item>
456
    /// </list>
457
    /// </remarks>
458
    public static void DeactivateElement<T>(bool clear = true)
459
        where T : Element
460
    {
UNCOV
461
        var element =
×
UNCOV
462
            GetVisibleElement<T>()
×
UNCOV
463
            ?? throw new ElementNotFoundException("Invalid element. Not found in the window.");
×
UNCOV
464
        if (element.Visibility)
×
465
        {
UNCOV
466
            element.ToggleVisibility();
×
UNCOV
467
            if (clear)
×
468
            {
UNCOV
469
                element.Clear();
×
470
            }
471
        }
UNCOV
472
    }
×
473

474
    /// <summary>
475
    /// This method deactivate the visibility of all elements.
476
    /// </summary>
477
    /// <remarks>
478
    /// For more information, refer to the following resources:
479
    /// <list type="bullet">
480
    /// <item><description><a href="https://morgankryze.github.io/ConsoleAppVisuals/">Documentation</a></description></item>
481
    /// <item><description><a href="https://github.com/MorganKryze/ConsoleAppVisuals/blob/main/example/Program.cs">Example Project</a></description></item>
482
    /// </list>
483
    /// </remarks>
484
    public static void DeactivateAllElements()
485
    {
UNCOV
486
        foreach (var element in s_elements)
×
487
        {
UNCOV
488
            if (element.Visibility)
×
489
            {
UNCOV
490
                element.ToggleVisibility();
×
491
            }
492
        }
UNCOV
493
        Refresh();
×
UNCOV
494
    }
×
495
    #endregion
496

497
    #region Utility Methods: AllowVisibilityToggle, GetLineAvailable, Clear, StopExecution, RenderOne, Refresh
498
    private static void UpdateIDs()
499
    {
500
        for (int i = 0; i < s_elements.Count; i++)
24!
501
        {
502
            s_elements[i].Id = i;
×
503
        }
504
    }
12✔
505

506
    /// <summary>
507
    /// This method checks if the element can be toggled to visible.
508
    /// </summary>
509
    /// <param name="id">The id of the element.</param>
510
    /// <returns>True if the element can be toggled to visible, false otherwise.</returns>
511
    public static bool AllowVisibilityToggle(int id)
512
    {
513
        if (s_elements[id].IsInteractive)
27✔
514
        {
515
            int numberOfVisibleInteractiveElements = s_elements.Count(
15✔
516
                element => element.IsInteractive && element.Visibility
24!
517
            );
15✔
518
            return numberOfVisibleInteractiveElements == 0;
15✔
519
        }
520
        else
521
        {
522
            int numberOfVisibleElements = s_elements.Count(
12✔
523
                element => element.GetType() == s_elements[id].GetType() && element.Visibility
12!
524
            );
12✔
525
            return numberOfVisibleElements < s_elements[id].MaxNumberOfThisElement;
12✔
526
        }
527
    }
528

529
    /// <summary>
530
    /// Gives the last line available to draw an element on the console from a placement.
531
    /// </summary>
532
    /// <param name="placement">The placement of the element.</param>
533
    /// <returns>The last line available to draw an element on the console from a placement.</returns>
534
    /// <exception cref="ArgumentOutOfRangeException">Thrown when the placement is invalid.</exception>
535
    /// <remarks>
536
    /// For more information, refer to the following resources:
537
    /// <list type="bullet">
538
    /// <item><description><a href="https://morgankryze.github.io/ConsoleAppVisuals/">Documentation</a></description></item>
539
    /// <item><description><a href="https://github.com/MorganKryze/ConsoleAppVisuals/blob/main/example/Program.cs">Example Project</a></description></item>
540
    /// </list>
541
    /// </remarks>
542
    public static int GetLineAvailable(Placement placement)
543
    {
544
        return placement switch
72!
545
        {
72✔
546
            Placement.TopCenterFullWidth
72✔
547
                => s_elements
×
548
                    .Where(e => e.Placement == Placement.TopCenterFullWidth && e.Visibility)
×
549
                    .Sum(e => e.Height)
×
550
                    + s_elements
×
551
                        .Where(e => e.Placement == Placement.TopCenter && e.Visibility)
×
552
                        .Sum(e => e.Height)
×
553
                    + s_elements
×
554
                        .Where(e => e.Placement == Placement.TopLeft && e.Visibility)
×
555
                        .Sum(e => e.Height)
×
556
                    + s_elements
×
557
                        .Where(e => e.Placement == Placement.TopRight && e.Visibility)
×
558
                        .Sum(e => e.Height),
×
559
            Placement.TopCenter
72✔
560
                => s_elements
72✔
561
                    .Where(e => e.Placement == Placement.TopCenterFullWidth && e.Visibility)
15!
562
                    .Sum(e => e.Height)
×
563
                    + s_elements
72✔
564
                        .Where(e => e.Placement == Placement.TopCenter && e.Visibility)
15!
565
                        .Sum(e => e.Height),
72✔
566
            Placement.TopLeft
72✔
567
                => s_elements
×
568
                    .Where(e => e.Placement == Placement.TopCenterFullWidth && e.Visibility)
×
569
                    .Sum(e => e.Height)
×
570
                    + s_elements
×
571
                        .Where(e => e.Placement == Placement.TopLeft && e.Visibility)
×
572
                        .Sum(e => e.Height),
×
573

72✔
574
            Placement.TopRight
72✔
UNCOV
575
                => s_elements
×
UNCOV
576
                    .Where(e => e.Placement == Placement.TopCenterFullWidth && e.Visibility)
×
UNCOV
577
                    .Sum(e => e.Height)
×
UNCOV
578
                    + s_elements
×
UNCOV
579
                        .Where(e => e.Placement == Placement.TopRight && e.Visibility)
×
UNCOV
580
                        .Sum(e => e.Height),
×
581
            Placement.BottomCenterFullWidth
72✔
UNCOV
582
                => Console.WindowHeight
×
UNCOV
583
                    - s_elements
×
UNCOV
584
                        .Where(e => e.Placement == Placement.BottomCenterFullWidth && e.Visibility)
×
UNCOV
585
                        .Sum(e => e.Height),
×
UNCOV
586
            _ => throw new ArgumentOutOfRangeException(nameof(placement), "Invalid placement.")
×
587
        };
72✔
588
    }
589

590
    /// <summary>
591
    /// This method checks if the line is valid.
592
    /// </summary>
593
    /// <param name="line">The line to be checked.</param>
594
    /// <returns>The line if it is valid.</returns>
595
    /// <exception cref="ArgumentOutOfRangeException">Thrown when the line is out of range.</exception>
596
    /// <remarks>
597
    /// For more information, refer to the following resources:
598
    /// <list type="bullet">
599
    /// <item><description><a href="https://morgankryze.github.io/ConsoleAppVisuals/">Documentation</a></description></item>
600
    /// <item><description><a href="https://github.com/MorganKryze/ConsoleAppVisuals/blob/main/example/Program.cs">Example Project</a></description></item>
601
    /// </list>
602
    /// </remarks>
603
    public static int? CheckLine(int? line)
604
    {
605
        if (line is null)
72!
606
        {
607
            return line;
72✔
608
        }
UNCOV
609
        if (line < 0 || line >= Console.WindowHeight)
×
610
        {
UNCOV
611
            throw new ArgumentOutOfRangeException(
×
UNCOV
612
                nameof(line),
×
UNCOV
613
                $"Invalid line. The line must be between 0 and {Console.WindowHeight - 1}."
×
UNCOV
614
            );
×
615
        }
UNCOV
616
        return line;
×
617
    }
618

619
    /// <summary>
620
    /// This method clears the window.
621
    /// </summary>
622
    /// <param name="continuous">If true, the window will be cleared continuously.</param>
623
    /// <remarks>
624
    /// For more information, refer to the following resources:
625
    /// <list type="bullet">
626
    /// <item><description><a href="https://morgankryze.github.io/ConsoleAppVisuals/">Documentation</a></description></item>
627
    /// <item><description><a href="https://github.com/MorganKryze/ConsoleAppVisuals/blob/main/example/Program.cs">Example Project</a></description></item>
628
    /// </list>
629
    /// </remarks>
630
    public static void Clear(bool continuous = false)
631
    {
632
        if (continuous)
3!
633
        {
UNCOV
634
            for (int i = 0; i < Console.WindowHeight; i++)
×
635
            {
636
                Core.WriteContinuousString("".PadRight(Console.WindowWidth), i, false, 100, 10);
×
637
            }
638
        }
639
        else
640
        {
641
            for (int i = 0; i < Console.WindowHeight; i++)
6!
642
            {
UNCOV
643
                Core.WritePositionedString(
×
UNCOV
644
                    "".PadRight(Console.WindowWidth),
×
UNCOV
645
                    TextAlignment.Center,
×
UNCOV
646
                    false,
×
UNCOV
647
                    i
×
UNCOV
648
                );
×
649
            }
650
        }
651
    }
3✔
652

653
    /// <summary>
654
    /// This method stops the execution of the program until a key is pressed.
655
    /// </summary>
656
    /// <remarks>
657
    /// For more information, refer to the following resources:
658
    /// <list type="bullet">
659
    /// <item><description><a href="https://morgankryze.github.io/ConsoleAppVisuals/">Documentation</a></description></item>
660
    /// <item><description><a href="https://github.com/MorganKryze/ConsoleAppVisuals/blob/main/example/Program.cs">Example Project</a></description></item>
661
    /// </list>
662
    /// </remarks>
663
    public static void StopExecution(ConsoleKey key = ConsoleKey.Enter)
664
    {
665
        // wait until the user presses a key
UNCOV
666
        while (Console.ReadKey(intercept: true).Key != key)
×
667
        {
UNCOV
668
            Thread.Sleep(10);
×
669
        }
UNCOV
670
    }
×
671

672
    /// <summary>
673
    /// This method draws the element with the given id on the console.
674
    /// </summary>
675
    /// <param name="id">The id of the element.</param>
676
    /// <exception cref="ElementNotFoundException">Thrown when the id is out of range.</exception>
677
    /// <remarks>
678
    /// For more information, refer to the following resources:
679
    /// <list type="bullet">
680
    /// <item><description><a href="https://morgankryze.github.io/ConsoleAppVisuals/">Documentation</a></description></item>
681
    /// <item><description><a href="https://github.com/MorganKryze/ConsoleAppVisuals/blob/main/example/Program.cs">Example Project</a></description></item>
682
    /// </list>
683
    /// </remarks>
684
    public static void RenderOneElement(int id)
685
    {
UNCOV
686
        if (id < 0 || id >= s_elements.Count)
×
687
        {
UNCOV
688
            throw new ElementNotFoundException("Invalid element ID.");
×
689
        }
UNCOV
690
        s_elements[id].RenderElement();
×
UNCOV
691
    }
×
692

693
    /// <summary>
694
    /// This method draws the given element on the console.
695
    /// </summary>
696
    /// <param name="element">The element to be drawn.</param>
697
    /// <exception cref="ElementNotFoundException">Thrown when the element is invalid.</exception>
698
    /// <remarks>
699
    /// For more information, refer to the following resources:
700
    /// <list type="bullet">
701
    /// <item><description><a href="https://morgankryze.github.io/ConsoleAppVisuals/">Documentation</a></description></item>
702
    /// <item><description><a href="https://github.com/MorganKryze/ConsoleAppVisuals/blob/main/example/Program.cs">Example Project</a></description></item>
703
    /// </list>
704
    /// </remarks>
705
    public static void RenderOneElement(Element element)
706
    {
UNCOV
707
        if (element == null || !s_elements.Contains(element))
×
708
        {
UNCOV
709
            throw new ElementNotFoundException("Invalid element. Not found in the window.");
×
710
        }
711

712
        element.RenderElement();
×
713
    }
×
714

715
    /// <summary>
716
    /// This method draws all the non interactive elements of the window on the console.
717
    /// </summary>
718
    /// <remarks>
719
    /// For more information, refer to the following resources:
720
    /// <list type="bullet">
721
    /// <item><description><a href="https://morgankryze.github.io/ConsoleAppVisuals/">Documentation</a></description></item>
722
    /// <item><description><a href="https://github.com/MorganKryze/ConsoleAppVisuals/blob/main/example/Program.cs">Example Project</a></description></item>
723
    /// </list>
724
    /// </remarks>
725
    public static void Refresh()
726
    {
727
        Clear();
3✔
728
        foreach (var element in s_elements)
18✔
729
        {
730
            element.RenderElement();
6✔
731
        }
732
    }
3✔
733

734
    /// <summary>
735
    /// This method is called to refresh the window when the size of the console is changed.
736
    /// </summary>
737
    public static void OnResize()
738
    {
UNCOV
739
        if (Core.IsScreenUpdated)
×
740
        {
UNCOV
741
            Core.SetConsoleDimensions();
×
UNCOV
742
            Refresh();
×
743
        }
744
    }
×
745

746
    /// <summary>
747
    /// This method draws all the space of the elements of the window on the console.
748
    /// </summary>
749
    /// <remarks>
750
    /// For more information, refer to the following resources:
751
    /// <list type="bullet">
752
    /// <item><description><a href="https://morgankryze.github.io/ConsoleAppVisuals/">Documentation</a></description></item>
753
    /// <item><description><a href="https://github.com/MorganKryze/ConsoleAppVisuals/blob/main/example/Program.cs">Example Project</a></description></item>
754
    /// </list>
755
    /// </remarks>
756
    public static void RenderAllElementsSpace()
757
    {
UNCOV
758
        foreach (var element in s_elements)
×
759
        {
UNCOV
760
            element.RenderElementSpace();
×
761
        }
762
    }
×
763

764
    /// <summary>
765
    /// This method closes the window and exit the program.
766
    /// </summary>
767
    /// <remarks>
768
    /// For more information, refer to the following resources:
769
    /// <list type="bullet">
770
    /// <item><description><a href="https://morgankryze.github.io/ConsoleAppVisuals/">Documentation</a></description></item>
771
    /// <item><description><a href="https://github.com/MorganKryze/ConsoleAppVisuals/blob/main/example/Program.cs">Example Project</a></description></item>
772
    /// </list>
773
    /// </remarks>
774
    public static void Close()
775
    {
UNCOV
776
        Core.LoadTerminalColorPanel();
×
UNCOV
777
        Clear(true);
×
UNCOV
778
        Console.CursorVisible = true;
×
UNCOV
779
        Environment.Exit(0);
×
UNCOV
780
    }
×
781
    #endregion
782

783
    #region Info Methods: ListWindowElements, ListClassesInheritingElement, ListClassesInheritingInteractiveElement
784
    /// <summary>
785
    /// This method displays a list of all elements in the window and adds a table to the window.
786
    /// </summary>
787
    /// <param name="placement">The placement of the element.</param>
788
    /// <remarks>
789
    /// For more information, refer to the following resources:
790
    /// <list type="bullet">
791
    /// <item><description><a href="https://morgankryze.github.io/ConsoleAppVisuals/">Documentation</a></description></item>
792
    /// <item><description><a href="https://github.com/MorganKryze/ConsoleAppVisuals/blob/main/example/Program.cs">Example Project</a></description></item>
793
    /// </list>
794
    /// </remarks>
795
    public static void AddListWindowElements(Placement placement = Placement.TopCenter)
796
    {
797
        TableView<string> table =
6✔
798
            new(
6✔
799
                "Window Elements",
6✔
800
                new List<string>
6✔
801
                {
6✔
802
                    "Id",
6✔
803
                    "Type",
6✔
804
                    "Visibility",
6✔
805
                    "Height",
6✔
806
                    "Width",
6✔
807
                    "Line",
6✔
808
                    "Placement",
6✔
809
                    "IsInteractive",
6✔
810
                    "Source"
6✔
811
                },
6✔
812
                null,
6✔
813
                placement
6✔
814
            )
6✔
815
            {
6✔
816
                ElementSource = Source.Library
6✔
817
            };
6✔
818
        AddElement(table);
6✔
819
        foreach (var element in s_elements)
24✔
820
        {
821
            table.AddLine(
6✔
822
                new List<string>
6✔
823
                {
6✔
824
                    element.Id.ToString(),
6✔
825
                    element.GetType().Name,
6✔
826
                    element.Visibility.ToString(),
6✔
827
                    element.Height.ToString(),
6✔
828
                    element.Width.ToString(),
6✔
829
                    element.Line.ToString(),
6✔
830
                    element.Placement.ToString(),
6✔
831
                    element.IsInteractive.ToString(),
6✔
832
                    element.ElementSource.ToString()
6✔
833
                }
6✔
834
            );
6✔
835
        }
836
    }
6✔
837

838
    /// <summary>
839
    /// This method is used to get a list of all the types of the elements in the window.
840
    /// </summary>
841
    /// <returns>A list of all the types of the elements in the window.</returns>
842
    /// <remarks>
843
    /// For more information, refer to the following resources:
844
    /// <list type="bullet">
845
    /// <item><description><a href="https://morgankryze.github.io/ConsoleAppVisuals/">Documentation</a></description></item>
846
    /// <item><description><a href="https://github.com/MorganKryze/ConsoleAppVisuals/blob/main/example/Program.cs">Example Project</a></description></item>
847
    /// </list>
848
    /// </remarks>
849
    public static List<string>? GetListWindowElements()
850
    {
851
        TableView<string> table =
×
852
            new(
×
853
                "Window Elements",
×
854
                new List<string>
×
855
                {
×
856
                    "Id",
×
UNCOV
857
                    "Type",
×
858
                    "Visibility",
×
859
                    "Height",
×
860
                    "Width",
×
861
                    "Line",
×
862
                    "Placement",
×
863
                    "IsInteractive",
×
864
                    "Source"
×
865
                }
×
866
            )
×
867
            {
×
868
                ElementSource = Source.Library
×
869
            };
×
870
        foreach (var element in s_elements)
×
871
        {
UNCOV
872
            table.AddLine(
×
873
                new List<string>
×
UNCOV
874
                {
×
UNCOV
875
                    element.Id.ToString(),
×
UNCOV
876
                    element.GetType().Name,
×
UNCOV
877
                    element.Visibility.ToString(),
×
UNCOV
878
                    element.Height.ToString(),
×
UNCOV
879
                    element.Width.ToString(),
×
UNCOV
880
                    element.Line.ToString(),
×
UNCOV
881
                    element.Placement.ToString(),
×
UNCOV
882
                    element.IsInteractive.ToString(),
×
UNCOV
883
                    element.ElementSource.ToString()
×
UNCOV
884
                }
×
UNCOV
885
            );
×
886
        }
UNCOV
887
        return table.GetColumnData("Type");
×
888
    }
889

890
    /// <summary>
891
    /// This method gives a list of all classes inheriting from the Element (and so InteractiveElement as well) class and adds a table to the window.
892
    /// </summary>
893
    /// <param name="placement">The placement of the element.</param>
894
    /// <returns>The list of all classes inheriting from the Element class.</returns>
895
    /// <remarks>
896
    /// For more information, refer to the following resources:
897
    /// <list type="bullet">
898
    /// <item><description><a href="https://morgankryze.github.io/ConsoleAppVisuals/">Documentation</a></description></item>
899
    /// <item><description><a href="https://github.com/MorganKryze/ConsoleAppVisuals/blob/main/example/Program.cs">Example Project</a></description></item>
900
    /// </list>
901
    /// </remarks>
902
    public static void AddListClassesInheritingElement(Placement placement = Placement.TopCenter)
903
    {
904
        var types = new List<Type>();
×
905
        foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies())
×
906
        {
UNCOV
907
            if (
×
908
                assembly.FullName != null
×
UNCOV
909
                && !assembly.FullName.StartsWith("mscorlib")
×
UNCOV
910
                && !assembly.FullName.StartsWith("System")
×
UNCOV
911
                && !assembly.FullName.StartsWith("Microsoft")
×
912
            )
×
913
            {
914
                types.AddRange(assembly.GetTypes().Where(t => t.IsSubclassOf(typeof(Element))));
×
915
            }
916
        }
917
        TableView<string> table =
×
918
            new("Element Classes", new List<string> { "Id", "Type", "Project" }, null, placement);
×
919
        var id = 0;
×
UNCOV
920
        foreach (var type in types)
×
921
        {
UNCOV
922
            if (type.IsAbstract)
×
923
            {
924
                continue;
925
            }
UNCOV
926
            table.AddLine(
×
UNCOV
927
                new List<string> { $"{id}", type.Name, type.Assembly.GetName().Name ?? "Unknown" }
×
UNCOV
928
            );
×
UNCOV
929
            id += 1;
×
930
        }
UNCOV
931
        table.ElementSource = Source.Library;
×
UNCOV
932
        AddElement(table);
×
UNCOV
933
    }
×
934

935
    /// <summary>
936
    /// This method is used to get a list of all the types of the classes inheriting from the Element class.
937
    /// </summary>
938
    /// <returns>A list of all the types of the classes inheriting from the Element class.</returns>
939
    /// <remarks>
940
    /// For more information, refer to the following resources:
941
    /// <list type="bullet">
942
    /// <item><description><a href="https://morgankryze.github.io/ConsoleAppVisuals/">Documentation</a></description></item>
943
    /// <item><description><a href="https://github.com/MorganKryze/ConsoleAppVisuals/blob/main/example/Program.cs">Example Project</a></description></item>
944
    /// </list>
945
    /// </remarks>
946
    public static List<string>? GetListClassesInheritingElement()
947
    {
948
        var types = new List<Type>();
×
949
        foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies())
×
950
        {
UNCOV
951
            if (
×
952
                assembly.FullName != null
×
UNCOV
953
                && !assembly.FullName.StartsWith("mscorlib")
×
UNCOV
954
                && !assembly.FullName.StartsWith("System")
×
UNCOV
955
                && !assembly.FullName.StartsWith("Microsoft")
×
956
            )
×
957
            {
958
                types.AddRange(
×
959
                    assembly
×
UNCOV
960
                        .GetTypes()
×
961
                        .Where(
×
UNCOV
962
                            t =>
×
UNCOV
963
                                t.IsSubclassOf(typeof(Element)) && t != typeof(InteractiveElement<>)
×
UNCOV
964
                        )
×
UNCOV
965
                );
×
966
            }
967
        }
UNCOV
968
        TableView<string> table =
×
UNCOV
969
            new("Element Classes", new List<string> { "Id", "Type", "Project" });
×
UNCOV
970
        var id = 0;
×
UNCOV
971
        foreach (var type in types)
×
972
        {
973
            if (type.IsAbstract)
×
974
            {
975
                continue;
976
            }
977
            table.AddLine(
×
978
                new List<string> { $"{id}", type.Name, type.Assembly.GetName().Name ?? "Unknown" }
×
979
            );
×
980
            id += 1;
×
981
        }
UNCOV
982
        return table.GetColumnData("Type");
×
983
    }
984

985
    /// <summary>
986
    /// This method gives a list of all classes inheriting from the InteractiveElement class and adds a table to the window.
987
    /// </summary>
988
    /// <param name="placement">The placement of the element.</param>
989
    /// <returns>The list of all classes inheriting from the InteractiveElement class.</returns>
990
    public static void AddListClassesInheritingInteractiveElement(
991
        Placement placement = Placement.TopCenter
992
    )
993
    {
UNCOV
994
        var types = new List<Type>();
×
UNCOV
995
        foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies())
×
996
        {
997
            if (
×
998
                assembly.FullName != null
×
999
                && !assembly.FullName.StartsWith("mscorlib")
×
1000
                && !assembly.FullName.StartsWith("System")
×
1001
                && !assembly.FullName.StartsWith("Microsoft")
×
1002
            )
×
1003
            {
1004
                types.AddRange(
×
UNCOV
1005
                    assembly
×
1006
                        .GetTypes()
×
1007
                        .Where(
×
1008
                            t =>
×
1009
                                t.BaseType != null
×
UNCOV
1010
                                && t.BaseType.IsGenericType
×
1011
                                && t.BaseType.GetGenericTypeDefinition()
×
1012
                                    == typeof(InteractiveElement<>)
×
1013
                        )
×
UNCOV
1014
                );
×
1015
            }
1016
        }
UNCOV
1017
        TableView<string> table =
×
UNCOV
1018
            new(
×
UNCOV
1019
                "Interactive Element Classes",
×
UNCOV
1020
                new List<string> { "Id", "Type", "Project" },
×
UNCOV
1021
                null,
×
UNCOV
1022
                placement
×
UNCOV
1023
            );
×
UNCOV
1024
        var id = 0;
×
UNCOV
1025
        foreach (var type in types)
×
1026
        {
UNCOV
1027
            table.AddLine(
×
1028
                new List<string> { $"{id}", type.Name, type.Assembly.GetName().Name ?? "Unknown" }
×
1029
            );
×
UNCOV
1030
            id += 1;
×
1031
        }
1032
        table.ElementSource = Source.Library;
×
1033
        AddElement(table);
×
1034
    }
×
1035

1036
    /// <summary>
1037
    /// This method is used to get a list of all the types of the classes inheriting from the InteractiveElement class.
1038
    /// </summary>
1039
    /// <returns>A list of all the types of the classes inheriting from the InteractiveElement class.</returns>
1040
    /// <remarks>
1041
    /// For more information, refer to the following resources:
1042
    /// <list type="bullet">
1043
    /// <item><description><a href="https://morgankryze.github.io/ConsoleAppVisuals/">Documentation</a></description></item>
1044
    /// <item><description><a href="https://github.com/MorganKryze/ConsoleAppVisuals/blob/main/example/Program.cs">Example Project</a></description></item>
1045
    /// </list>
1046
    /// </remarks>
1047
    public static List<string>? GetListClassesInheritingInteractiveElement()
1048
    {
UNCOV
1049
        var types = new List<Type>();
×
UNCOV
1050
        foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies())
×
1051
        {
1052
            if (
×
1053
                assembly.FullName != null
×
1054
                && !assembly.FullName.StartsWith("mscorlib")
×
UNCOV
1055
                && !assembly.FullName.StartsWith("System")
×
1056
                && !assembly.FullName.StartsWith("Microsoft")
×
1057
            )
×
1058
            {
1059
                types.AddRange(
×
UNCOV
1060
                    assembly
×
1061
                        .GetTypes()
×
UNCOV
1062
                        .Where(
×
UNCOV
1063
                            t =>
×
UNCOV
1064
                                t.BaseType != null
×
UNCOV
1065
                                && t.BaseType.IsGenericType
×
UNCOV
1066
                                && t.BaseType.GetGenericTypeDefinition()
×
UNCOV
1067
                                    == typeof(InteractiveElement<>)
×
UNCOV
1068
                        )
×
UNCOV
1069
                );
×
1070
            }
1071
        }
UNCOV
1072
        TableView<string> table =
×
UNCOV
1073
            new("Interactive Element Classes", new List<string> { "Id", "Type", "Project" });
×
UNCOV
1074
        var id = 0;
×
UNCOV
1075
        foreach (var type in types)
×
1076
        {
1077
            table.AddLine(
×
1078
                new List<string> { $"{id}", type.Name, type.Assembly.GetName().Name ?? "Unknown" }
×
1079
            );
×
UNCOV
1080
            id += 1;
×
1081
        }
UNCOV
1082
        return table.GetColumnData("Type");
×
1083
    }
1084

1085
    /// <summary>
1086
    /// This method displays a list of all elements in the window, a list of all classes inheriting from the Element class and a list of all classes inheriting from the InteractiveElement class.
1087
    /// </summary>
1088
    /// <remarks>
1089
    /// For more information, refer to the following resources:
1090
    /// <list type="bullet">
1091
    /// <item><description><a href="https://morgankryze.github.io/ConsoleAppVisuals/">Documentation</a></description></item>
1092
    /// <item><description><a href="https://github.com/MorganKryze/ConsoleAppVisuals/blob/main/example/Program.cs">Example Project</a></description></item>
1093
    /// </list>
1094
    /// </remarks>
1095
    public static void AddDashboard()
1096
    {
UNCOV
1097
        AddListClassesInheritingElement(Placement.TopLeft);
×
UNCOV
1098
        AddListClassesInheritingInteractiveElement(Placement.TopRight);
×
UNCOV
1099
        AddListWindowElements(Placement.TopCenter);
×
UNCOV
1100
    }
×
1101

1102
    /// <summary>
1103
    /// This method removes the dashboard TableView from the window.
1104
    /// </summary>
1105
    /// <remarks>
1106
    /// For more information, refer to the following resources:
1107
    /// <list type="bullet">
1108
    /// <item><description><a href="https://morgankryze.github.io/ConsoleAppVisuals/">Documentation</a></description></item>
1109
    /// <item><description><a href="https://github.com/MorganKryze/ConsoleAppVisuals/blob/main/example/Program.cs">Example Project</a></description></item>
1110
    /// </list>
1111
    /// </remarks>
1112
    public static void RemoveDashboard()
1113
    {
UNCOV
1114
        RemoveLibraryElement<TableView<string>>();
×
UNCOV
1115
        RemoveLibraryElement<TableView<string>>();
×
UNCOV
1116
        RemoveLibraryElement<TableView<string>>();
×
UNCOV
1117
    }
×
1118
    #endregion
1119
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc