diff --git a/coverage/Cobertura.xml b/coverage/Cobertura.xml new file mode 100644 index 00000000..5233543e --- /dev/null +++ b/coverage/Cobertura.xml @@ -0,0 +1,2615 @@ + + + + + /home/runner/work/Utility-Blazor/Utility-Blazor/src/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/coverage/Utility.Common_InvertCharExtension.html b/coverage/Utility.Common_InvertCharExtension.html new file mode 100644 index 00000000..c3cf657d --- /dev/null +++ b/coverage/Utility.Common_InvertCharExtension.html @@ -0,0 +1,1176 @@ + + + + + + + +Utility.Common.InvertCharExtension - Coverage Report + +
+

< Summary

+
+
+
Information
+
+
+ + + + + + + + + + + + + + + + + +
Class:Utility.Common.InvertCharExtension
Assembly:Utility.Common
File(s):/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility.Common/StringExtensions.cs
Tag:106_9081424346
+
+
+
+
+
+
+
Line coverage
+
+
0%
+
+ + + + + + + + + + + + + + + + + + + + + +
Covered lines:0
Uncovered lines:5
Coverable lines:5
Total lines:38
Line coverage:0%
+
+
+
+
+
Branch coverage
+
+
0%
+
+ + + + + + + + + + + + + +
Covered branches:0
Total branches:4
Branch coverage:0%
+
+
+
+
+
Method coverage
+
+
+

Feature is only available for sponsors

+Upgrade to PRO version +
+
+
+
+

Metrics

+
+ +++++++ + + + + +
MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
Invert(...)0%2040%
+
+

File(s)

+

/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility.Common/StringExtensions.cs

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#LineLine coverage
 1namespace Utility.Common;
 2
 3public static class StringExtensions
 4{
 5    // https://stackoverflow.com/a/4405876/2895831
 6    public static string FirstCharToUpper(this string input) =>
 7        input switch
 8        {
 9            null => throw new ArgumentNullException(nameof(input)),
 10            "" => throw new ArgumentException($"{nameof(input)} cannot be empty", nameof(input)),
 11            _ => string.Concat(input[0].ToString().ToUpper(), input.AsSpan(1))
 12        };
 13}
 14
 15// https://stackoverflow.com/a/41748138/2895831
 16public static class InvertStringExtension
 17{
 18    public static string Invert(this string s)
 19    {
 20        char[] chars = s.ToCharArray();
 21        for (int i = 0; i < chars.Length; i++)
 22            chars[i] = chars[i].Invert();
 23
 24        return new string(chars);
 25    }
 26}
 27
 28// https://stackoverflow.com/a/41748138/2895831
 29public static class InvertCharExtension
 30{
 31    public static char Invert(this char c)
 032    {
 033        if (!char.IsLetter(c))
 034            return c;
 35
 036        return char.IsUpper(c) ? char.ToLower(c) : char.ToUpper(c);
 037    }
 38}
+
+
+
+
+

Methods/Properties

+Invert(System.Char)
+
+
+ + \ No newline at end of file diff --git a/coverage/Utility.Common_InvertStringExtension.html b/coverage/Utility.Common_InvertStringExtension.html new file mode 100644 index 00000000..77f11b96 --- /dev/null +++ b/coverage/Utility.Common_InvertStringExtension.html @@ -0,0 +1,1176 @@ + + + + + + + +Utility.Common.InvertStringExtension - Coverage Report + +
+

< Summary

+
+
+
Information
+
+
+ + + + + + + + + + + + + + + + + +
Class:Utility.Common.InvertStringExtension
Assembly:Utility.Common
File(s):/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility.Common/StringExtensions.cs
Tag:106_9081424346
+
+
+
+
+
+
+
Line coverage
+
+
0%
+
+ + + + + + + + + + + + + + + + + + + + + +
Covered lines:0
Uncovered lines:6
Coverable lines:6
Total lines:38
Line coverage:0%
+
+
+
+
+
Branch coverage
+
+
0%
+
+ + + + + + + + + + + + + +
Covered branches:0
Total branches:2
Branch coverage:0%
+
+
+
+
+
Method coverage
+
+
+

Feature is only available for sponsors

+Upgrade to PRO version +
+
+
+
+

Metrics

+
+ +++++++ + + + + +
MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
Invert(...)0%620%
+
+

File(s)

+

/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility.Common/StringExtensions.cs

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#LineLine coverage
 1namespace Utility.Common;
 2
 3public static class StringExtensions
 4{
 5    // https://stackoverflow.com/a/4405876/2895831
 6    public static string FirstCharToUpper(this string input) =>
 7        input switch
 8        {
 9            null => throw new ArgumentNullException(nameof(input)),
 10            "" => throw new ArgumentException($"{nameof(input)} cannot be empty", nameof(input)),
 11            _ => string.Concat(input[0].ToString().ToUpper(), input.AsSpan(1))
 12        };
 13}
 14
 15// https://stackoverflow.com/a/41748138/2895831
 16public static class InvertStringExtension
 17{
 18    public static string Invert(this string s)
 019    {
 020        char[] chars = s.ToCharArray();
 021        for (int i = 0; i < chars.Length; i++)
 022            chars[i] = chars[i].Invert();
 23
 024        return new string(chars);
 025    }
 26}
 27
 28// https://stackoverflow.com/a/41748138/2895831
 29public static class InvertCharExtension
 30{
 31    public static char Invert(this char c)
 32    {
 33        if (!char.IsLetter(c))
 34            return c;
 35
 36        return char.IsUpper(c) ? char.ToLower(c) : char.ToUpper(c);
 37    }
 38}
+
+
+
+
+

Methods/Properties

+Invert(System.String)
+
+
+ + \ No newline at end of file diff --git a/coverage/Utility.Common_StringExtensions.html b/coverage/Utility.Common_StringExtensions.html new file mode 100644 index 00000000..bf821822 --- /dev/null +++ b/coverage/Utility.Common_StringExtensions.html @@ -0,0 +1,1176 @@ + + + + + + + +Utility.Common.StringExtensions - Coverage Report + +
+

< Summary

+
+
+
Information
+
+
+ + + + + + + + + + + + + + + + + +
Class:Utility.Common.StringExtensions
Assembly:Utility.Common
File(s):/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility.Common/StringExtensions.cs
Tag:106_9081424346
+
+
+
+
+
+
+
Line coverage
+
+
0%
+
+ + + + + + + + + + + + + + + + + + + + + +
Covered lines:0
Uncovered lines:6
Coverable lines:6
Total lines:38
Line coverage:0%
+
+
+
+
+
Branch coverage
+
+
0%
+
+ + + + + + + + + + + + + +
Covered branches:0
Total branches:4
Branch coverage:0%
+
+
+
+
+
Method coverage
+
+
+

Feature is only available for sponsors

+Upgrade to PRO version +
+
+
+
+

Metrics

+
+ +++++++ + + + + +
MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
FirstCharToUpper(...)0%2040%
+
+

File(s)

+

/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility.Common/StringExtensions.cs

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#LineLine coverage
 1namespace Utility.Common;
 2
 3public static class StringExtensions
 4{
 5    // https://stackoverflow.com/a/4405876/2895831
 6    public static string FirstCharToUpper(this string input) =>
 07        input switch
 08        {
 09            null => throw new ArgumentNullException(nameof(input)),
 010            "" => throw new ArgumentException($"{nameof(input)} cannot be empty", nameof(input)),
 011            _ => string.Concat(input[0].ToString().ToUpper(), input.AsSpan(1))
 012        };
 13}
 14
 15// https://stackoverflow.com/a/41748138/2895831
 16public static class InvertStringExtension
 17{
 18    public static string Invert(this string s)
 19    {
 20        char[] chars = s.ToCharArray();
 21        for (int i = 0; i < chars.Length; i++)
 22            chars[i] = chars[i].Invert();
 23
 24        return new string(chars);
 25    }
 26}
 27
 28// https://stackoverflow.com/a/41748138/2895831
 29public static class InvertCharExtension
 30{
 31    public static char Invert(this char c)
 32    {
 33        if (!char.IsLetter(c))
 34            return c;
 35
 36        return char.IsUpper(c) ? char.ToLower(c) : char.ToUpper(c);
 37    }
 38}
+
+
+
+
+

Methods/Properties

+FirstCharToUpper(System.String)
+
+
+ + \ No newline at end of file diff --git a/coverage/Utility_Ascii.html b/coverage/Utility_Ascii.html new file mode 100644 index 00000000..526b66cf --- /dev/null +++ b/coverage/Utility_Ascii.html @@ -0,0 +1,1210 @@ + + + + + + + +Utility.Components.Ascii.Ascii - Coverage Report + +
+

< Summary

+
+
+
Information
+
+
+ + + + + + + + + + + + + + + + + +
Class:Utility.Components.Ascii.Ascii
Assembly:Utility
File(s):/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Components/Ascii/Ascii.razor
Tag:106_9081424346
+
+
+
+
+
+
+
Line coverage
+
+
0%
+
+ + + + + + + + + + + + + + + + + + + + + +
Covered lines:0
Uncovered lines:15
Coverable lines:15
Total lines:68
Line coverage:0%
+
+
+
+
+
Branch coverage
+
+
N/A
+
+ + + + + + + + + + + + + +
Covered branches:0
Total branches:0
Branch coverage:N/A
+
+
+
+
+
Method coverage
+
+
+

Feature is only available for sponsors

+Upgrade to PRO version +
+
+
+
+

Metrics

+
+ +++++++ + + + + + + +
MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
BuildRenderTree(...)100%210%
.ctor()100%210%
GetAsciiValues()100%210%
+
+

File(s)

+

/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Components/Ascii/Ascii.razor

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#LineLine coverage
 1<div class="container">
 2    <div class="row">
 3        <div class="col">
 4
 5            <label class="label-control">Character:</label>
 6            <div class="input-group">
 7                <input id="ascii" name="ascii" class="form-control" @bind="AsciiValue" placeholder="'">
 8                <span class="input-group-btn">
 9                    <button id="btnAscii" name="btnAscii" type="button" class="btn btn-info float-right" @onclick="GetAs
 10                </span>
 11            </div>
 12
 13        </div>
 14    </div>
 15
 16    <br />
 17
 18    <div class="row">
 19        <div class="col">
 20
 21            <table id="asciiItems">
 22                <thead>
 23                <tr>
 24                    <th>Char</th>
 25                    <th>Dec</th>
 26                    <th>Hex</th>
 27                    <th>Oct</th>
 28                </tr>
 29                </thead>
 30                <tfoot></tfoot>
 31                <tbody>
 32                <tr>
 033                    <td>@Char</td>
 034                    <td>@Dec</td>
 035                    <td>@Hex</td>
 036                    <td>@Oct</td>
 37                </tr>
 38                </tbody>
 39            </table>
 40
 41        </div>
 42    </div>
 43
 44    <hr />
 45
 46    <div class="row">
 47        <div class="col">
 48            <p>Inspired from <a href="http://asciivalue.com/" target="_blank">ASCIIvalue</a></p>
 49        </div>
 50    </div>
 51</div>
 52
 53@code {
 054    string AsciiValue = "'";
 055    string Char = string.Empty;
 056    string Dec = string.Empty;
 057    string Hex = string.Empty;
 058    string Oct = string.Empty;
 59
 60    void GetAsciiValues()
 061    {
 062        Char = AsciiValue;
 063        Dec = "N/A";
 064        Hex = String.Concat(AsciiValue.Select(x => ((int)x).ToString("x2")));
 065        Oct = "N/A"; //Convert.ToInt32(AsciiValue, 8).ToString();
 066    }
 67
 68}
+
+
+
+ +
+ + \ No newline at end of file diff --git a/coverage/Utility_Base64.html b/coverage/Utility_Base64.html new file mode 100644 index 00000000..92bc3c87 --- /dev/null +++ b/coverage/Utility_Base64.html @@ -0,0 +1,1244 @@ + + + + + + + +Utility.Components.Base64.Base64 - Coverage Report + +
+

< Summary

+
+
+
Information
+
+
+ + + + + + + + + + + + + + + + + +
Class:Utility.Components.Base64.Base64
Assembly:Utility
File(s):/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Components/Base64/Base64.razor
Tag:106_9081424346
+
+
+
+
+
+
+
Line coverage
+
+
75%
+
+ + + + + + + + + + + + + + + + + + + + + +
Covered lines:18
Uncovered lines:6
Coverable lines:24
Total lines:92
Line coverage:75%
+
+
+
+
+
Branch coverage
+
+
100%
+
+ + + + + + + + + + + + + +
Covered branches:4
Total branches:4
Branch coverage:100%
+
+
+
+
+
Method coverage
+
+
+

Feature is only available for sponsors

+Upgrade to PRO version +
+
+
+
+

Metrics

+
+ +++++++ + + + + + + + + + + + +
MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Input()100%11100%
get_Output()100%11100%
Encode()100%22100%
Decode()100%22100%
Clear()100%210%
Copy()100%210%
Base64Encode(...)100%11100%
Base64Decode(...)100%11100%
+
+

File(s)

+

/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Components/Base64/Base64.razor

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#LineLine coverage
 1@using System.Text
 2@inject IJSRuntime JSRuntime
 3
 4<div class="container">
 5    <div class="row">
 6        <div class="col">
 7            <h2>Base64 Encode/Decode</h2>
 8        </div>
 9    </div>
 10    <div class="row">
 11        <div class="col">
 12            <div class="input-group">
 13                <textarea id="binary" class="form-control" rows="5" @bind="Input" placeholder="Base64"></textarea>
 14                <span class="input-group-btn">
 15                    <button id="btnDecode" name="btnDecode" class="btn btn-success" @onclick="Decode"><i class="fas fa-a
 16                    <button id="btnClear" name="btnClear" class="btn btn-danger float-right" @onclick="Clear"><i class="
 17                </span>
 18            </div>
 19        </div>
 20    </div>
 21
 22    <div class="row">
 23        <div class="col">
 24            <div class="input-group">
 25                <textarea id="output" class="form-control" rows="5" @bind="Output" placeholder="String"></textarea>
 26                <span class="input-group-btn">
 27                    <button id="btnEncode" name="btnEncode" class="btn btn-success" @onclick="Encode"><i class="fas fa-a
 28                    @* <button id="btnClear" name="btnClear" class="btn btn-danger float-right" @onclick="Clear"><i clas
 29                    <button id="btnCopy" name="btnCopy" class="btn btn-info float-right" @onclick="Copy"><i class="far f
 30                </span>
 31            </div>
 32        </div>
 33    </div>
 34
 35    <div class="row">
 36        <div class="col">
 37            <p>Inspired from <a href="https://www.base64encode.org" target="_blank">base64encode</a></p>
 38            <p>Inspired from <a href="https://www.base64decode.org" target="_blank">base64decode</a></p>
 39        </div>
 40    </div>
 41
 42</div>
 43
 44@code {
 45    [Parameter]
 2846    public string? Input { get; set; }
 47
 48    [Parameter]
 2849    public string? Output { get; set; }
 50
 51    // protected override void OnInitialized()
 52    // {
 53    //     Input = "QWxleEhlZGxleQ=="; // How self important //string.Empty;
 54    //     Output = string.Empty;
 55    // }
 56
 57    void Encode()
 258    {
 359        if (string.IsNullOrEmpty(Output)) return;
 160        Input = Base64Encode(Output);
 261    }
 62
 63    void Decode()
 264    {
 365        if (string.IsNullOrEmpty(Input)) return;
 166        Output = Base64Decode(Input);
 267    }
 68
 69    private void Clear()
 070    {
 071        Input = string.Empty;
 072    }
 73
 74    async Task Copy()
 075    {
 076        await JSRuntime.InvokeVoidAsync("navigator.clipboard.writeText", Output);
 077    }
 78
 79    // https://stackoverflow.com/a/11743162/2895831
 80
 81    public static string Base64Encode(string plainText)
 182    {
 183        var plainTextBytes = System.Text.Encoding.UTF8.GetBytes(plainText);
 184        return System.Convert.ToBase64String(plainTextBytes);
 185    }
 86
 87    public static string Base64Decode(string base64EncodedData)
 188    {
 189        var base64EncodedBytes = System.Convert.FromBase64String(base64EncodedData);
 190        return System.Text.Encoding.UTF8.GetString(base64EncodedBytes);
 191    }
 92}
+
+
+
+ +
+ + \ No newline at end of file diff --git a/coverage/Utility_Binary.html b/coverage/Utility_Binary.html new file mode 100644 index 00000000..a5b56b59 --- /dev/null +++ b/coverage/Utility_Binary.html @@ -0,0 +1,1212 @@ + + + + + + + +Utility.Components.Binary.Binary - Coverage Report + +
+

< Summary

+
+
+
Information
+
+
+ + + + + + + + + + + + + + + + + +
Class:Utility.Components.Binary.Binary
Assembly:Utility
File(s):/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Components/Binary/Binary.razor
Tag:106_9081424346
+
+
+
+
+
+
+
Line coverage
+
+
0%
+
+ + + + + + + + + + + + + + + + + + + + + +
Covered lines:0
Uncovered lines:23
Coverable lines:23
Total lines:66
Line coverage:0%
+
+
+
+
+
Branch coverage
+
+
0%
+
+ + + + + + + + + + + + + +
Covered branches:0
Total branches:2
Branch coverage:0%
+
+
+
+
+
Method coverage
+
+
+

Feature is only available for sponsors

+Upgrade to PRO version +
+
+
+
+

Metrics

+
+ +++++++ + + + + + + + + +
MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor()100%210%
Swap()100%210%
Clear()100%210%
Copy()100%210%
GetBytesFromBinaryString(...)0%620%
+
+

File(s)

+

/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Components/Binary/Binary.razor

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#LineLine coverage
 1@using System.Text
 2@inject IJSRuntime JSRuntime
 3
 4<div class="container">
 5    <div class="row">
 6        <div class="col">
 7            <textarea id="binary" class="form-control" rows="5" @bind="Input"></textarea>
 8        </div>
 9    </div>
 10
 11    <div class="row">
 12        <div class="col">
 13            <button id="btnBinary" name="btnBinary" class="btn btn-success float-right" @onclick="Swap">Swap</button>
 14            <button id="btnBinaryClear" name="btnBinaryClear" class="btn btn-danger float-right" @onclick="Clear"><i cla
 15        </div>
 16    </div>
 17    <div class="row">
 18        <div class="col">
 19            <textarea id="outputBinary" class="form-control" @bind="Output"></textarea>
 20        </div>
 21    </div>
 22    <div class="row">
 23        <div class="col">
 24            <button id="btnCopyBinary" name="btnCopyBinary" class="btn btn-info float-right" @onclick="Copy"><i class="f
 25        </div>
 26    </div>
 27
 28</div>
 29
 30@code {
 031    string Input = "01101111 01101110 01100101 00100000 01101100 01101001 01101110 01100101"; //string.Empty;
 032    string Output = string.Empty;
 33
 34    void Swap()
 035    {
 036        Input = String.Concat(Input.Where(c => !Char.IsWhiteSpace(c)));
 037        var data = GetBytesFromBinaryString(Input);
 038        var text = Encoding.ASCII.GetString(data);
 039        Output = text;
 040    }
 41
 42    private void Clear()
 043    {
 044        Input = string.Empty;
 045    }
 46
 47    async Task Copy()
 048    {
 049        await JSRuntime.InvokeVoidAsync("navigator.clipboard.writeText", Output);
 050    }
 51
 52    // https://stackoverflow.com/a/6008872/2895831
 53    private Byte[] GetBytesFromBinaryString(String binary)
 054    {
 055        var list = new List<Byte>();
 56
 057        for (int i = 0; i < binary.Length; i += 8)
 058        {
 059            String t = binary.Substring(i, 8);
 60
 061            list.Add(Convert.ToByte(t, 2));
 062        }
 63
 064        return list.ToArray();
 065    }
 66}
+
+
+
+ +
+ + \ No newline at end of file diff --git a/coverage/Utility_CacheStorageAccessor.html b/coverage/Utility_CacheStorageAccessor.html new file mode 100644 index 00000000..3f9d53d7 --- /dev/null +++ b/coverage/Utility_CacheStorageAccessor.html @@ -0,0 +1,1209 @@ + + + + + + + +Utility.Infrastructure.CacheStorageAccessor - Coverage Report + +
+

< Summary

+
+
+
Information
+
+
+ + + + + + + + + + + + + + + + + +
Class:Utility.Infrastructure.CacheStorageAccessor
Assembly:Utility
File(s):/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Infrastructure/CacheStorageAccessor.cs
Tag:106_9081424346
+
+
+
+
+
+
+
Line coverage
+
+
0%
+
+ + + + + + + + + + + + + + + + + + + + + +
Covered lines:0
Uncovered lines:36
Coverable lines:36
Total lines:59
Line coverage:0%
+
+
+
+
+
Branch coverage
+
+
0%
+
+ + + + + + + + + + + + + +
Covered branches:0
Total branches:2
Branch coverage:0%
+
+
+
+
+
Method coverage
+
+
+

Feature is only available for sponsors

+Upgrade to PRO version +
+
+
+
+

Metrics

+
+ +++++++ + + + + + + + + + + +
MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%210%
PutAsync()100%210%
PutAndGetAsync()100%210%
GetAsync()100%210%
RemoveAsync()100%210%
RemoveAllAsync()100%210%
GetRequestBodyAsync()0%620%
+
+

File(s)

+

/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Infrastructure/CacheStorageAccessor.cs

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#LineLine coverage
 1using Microsoft.FluentUI.AspNetCore.Components.Utilities;
 2using Microsoft.JSInterop;
 3
 4namespace Utility.Infrastructure;
 5
 06public class CacheStorageAccessor(IJSRuntime js) : JSModule(js, "./_content/FluentUI.Demo.Shared/js/CacheStorageAccessor
 7{
 8    public async ValueTask PutAsync(HttpRequestMessage requestMessage, HttpResponseMessage responseMessage)
 09    {
 010        var requestMethod = requestMessage.Method.Method;
 011        var requestBody = await GetRequestBodyAsync(requestMessage);
 012        var responseBody = await responseMessage.Content.ReadAsStringAsync();
 13
 014        await InvokeVoidAsync("put", requestMessage.RequestUri!, requestMethod, requestBody, responseBody);
 015    }
 16
 17    public async ValueTask<string> PutAndGetAsync(HttpRequestMessage requestMessage, HttpResponseMessage responseMessage
 018    {
 019        var requestMethod = requestMessage.Method.Method;
 020        var requestBody = await GetRequestBodyAsync(requestMessage);
 021        var responseBody = await responseMessage.Content.ReadAsStringAsync();
 22
 023        await InvokeVoidAsync("put", requestMessage.RequestUri!, requestMethod, requestBody, responseBody);
 24
 025        return responseBody;
 026    }
 27
 28    public async ValueTask<string> GetAsync(HttpRequestMessage requestMessage)
 029    {
 030        var requestMethod = requestMessage.Method.Method;
 031        var requestBody = await GetRequestBodyAsync(requestMessage);
 032        var result = await InvokeAsync<string>("get", requestMessage.RequestUri!, requestMethod, requestBody);
 33
 034        return result;
 035    }
 36
 37    public async ValueTask RemoveAsync(HttpRequestMessage requestMessage)
 038    {
 039        var requestMethod = requestMessage.Method.Method;
 040        var requestBody = await GetRequestBodyAsync(requestMessage);
 41
 042        await InvokeVoidAsync("remove", requestMessage.RequestUri!, requestMethod, requestBody);
 043    }
 44
 45    public async ValueTask RemoveAllAsync()
 046    {
 047        await InvokeVoidAsync("removeAll");
 048    }
 49    private static async ValueTask<string> GetRequestBodyAsync(HttpRequestMessage requestMessage)
 050    {
 051        var requestBody = string.Empty;
 052        if (requestMessage.Content is not null)
 053        {
 054            requestBody = await requestMessage.Content.ReadAsStringAsync();
 055        }
 56
 057        return requestBody;
 058    }
 59}
+
+
+
+ +
+ + \ No newline at end of file diff --git a/coverage/Utility_Constants.html b/coverage/Utility_Constants.html new file mode 100644 index 00000000..a17acd5a --- /dev/null +++ b/coverage/Utility_Constants.html @@ -0,0 +1,1144 @@ + + + + + + + +Utility.Constants - Coverage Report + +
+

< Summary

+
+
+
Information
+
+
+ + + + + + + + + + + + + + + + + +
Class:Utility.Constants
Assembly:Utility
File(s):/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Constants.cs
Tag:106_9081424346
+
+
+
+
+
+
+
Line coverage
+
+
0%
+
+ + + + + + + + + + + + + + + + + + + + + +
Covered lines:0
Uncovered lines:1
Coverable lines:1
Total lines:6
Line coverage:0%
+
+
+
+
+
Branch coverage
+
+
N/A
+
+ + + + + + + + + + + + + +
Covered branches:0
Total branches:0
Branch coverage:N/A
+
+
+
+
+
Method coverage
+
+
+

Feature is only available for sponsors

+Upgrade to PRO version +
+
+
+
+

Metrics

+
+ +++++++ + + + + +
MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.cctor()100%210%
+
+

File(s)

+

/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Constants.cs

+
+ + + + + + + + + + +
#LineLine coverage
 1namespace Utility;
 2
 3public static class Constants
 4{
 05    public static string LOCAL_STORAGE_TAB = "tab";
 6}
+
+
+
+
+

Methods/Properties

+.cctor()
+
+
+ + \ No newline at end of file diff --git a/coverage/Utility_EpochConverter.html b/coverage/Utility_EpochConverter.html new file mode 100644 index 00000000..457a150b --- /dev/null +++ b/coverage/Utility_EpochConverter.html @@ -0,0 +1,1216 @@ + + + + + + + +Utility.Components.EpochConverter.EpochConverter - Coverage Report + +
+

< Summary

+
+
+
Information
+
+
+ + + + + + + + + + + + + + + + + +
Class:Utility.Components.EpochConverter.EpochConverter
Assembly:Utility
File(s):/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Components/EpochConverter/EpochConverter.razor
Tag:106_9081424346
+
+
+
+
+
+
+
Line coverage
+
+
0%
+
+ + + + + + + + + + + + + + + + + + + + + +
Covered lines:0
Uncovered lines:14
Coverable lines:14
Total lines:72
Line coverage:0%
+
+
+
+
+
Branch coverage
+
+
N/A
+
+ + + + + + + + + + + + + +
Covered branches:0
Total branches:0
Branch coverage:N/A
+
+
+
+
+
Method coverage
+
+
+

Feature is only available for sponsors

+Upgrade to PRO version +
+
+
+
+

Metrics

+
+ +++++++ + + + + + + + +
MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
BuildRenderTree(...)100%210%
.ctor()100%210%
Refresh()100%210%
TimestampToHuman()100%210%
+
+

File(s)

+

/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Components/EpochConverter/EpochConverter.razor

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#LineLine coverage
 1@using Humanizer
 2@using ReverseMarkdown.Converters
 3
 4<div class="container">
 5    <div class="row">
 6        <div class="col">
 7
 8            <label class="label-control">Timestamps in seconds:</label>
 9            <div class="input-group">
 10                <input type="number" id="timestamp" name="timestamp" class="form-control" @bind="Timestamp">
 11                <span class="input-group-btn">
 12                    <button class="btn btn-info" type="button" id="btnRefresh" name="btnRefresh" @onclick="Refresh"><i c
 13                    <button class="btn btn-success" type="button" id="btnConvert" name="btnConvert" @onclick="TimestampT
 14                </span>
 15            </div>
 16
 17        </div>
 18    </div>
 19
 20    <br />
 21
 22    <div class="row">
 23        <div class="col">
 24
 025            <p><strong>GMT</strong>: @GMT</p>
 026            <p><strong>Your time zone</strong>: @YourTimeZone</p>
 027            <p><strong>Relative</strong>: @Relative</p>
 28
 29        </div>
 30    </div>
 31
 32    <hr />
 33
 34    <div class="row">
 35        <div class="col">
 36            <p>Todo: Datetime to EPOCH.</p>
 37        </div>
 38    </div>
 39
 40    <hr />
 41
 42    <div class="row">
 43        <div class="col">
 44            <p>Inspired from <a href="https://www.epochconverter.com" target="_blank">Epoch & Unix Timestamp Conversion 
 45            <p>"Relative" Powered by <a href="https://github.com/Humanizr/Humanizer" target="_blank">Humanizer</a>.</p>
 46        </div>
 47    </div>
 48</div>
 49
 50@code {
 051    long Timestamp = DateTimeOffset.Now.ToUnixTimeSeconds();
 52    string GMT;
 53    string YourTimeZone;
 54    string Relative;
 55
 56    void Refresh()
 057    {
 058        Timestamp = DateTimeOffset.Now.ToUnixTimeSeconds();
 059    }
 60
 61    void TimestampToHuman()
 062    {
 63        // var EPOCH = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds();
 064        DateTimeOffset dateTimeOffset = DateTimeOffset.FromUnixTimeSeconds(Timestamp);
 65        // DateTimeOffset dateTimeOffset2 = DateTimeOffset.FromUnixTimeMilliseconds(Timestamp);
 066        DateTime dateTime = dateTimeOffset.DateTime;
 067        GMT = dateTime.ToString("dddd, dd MMMM yyyy HH:mm:ss");
 068        YourTimeZone = dateTime.ToLocalTime().ToString("dddd, dd MMMM yyyy HH:mm:ss");
 069        Relative = dateTime.Humanize();
 070    }
 71
 72}
+
+
+
+ +
+ + \ No newline at end of file diff --git a/coverage/Utility_GuidGenerator.html b/coverage/Utility_GuidGenerator.html new file mode 100644 index 00000000..43552e5f --- /dev/null +++ b/coverage/Utility_GuidGenerator.html @@ -0,0 +1,1359 @@ + + + + + + + +Utility.Components.GuidGenerator.GuidGenerator - Coverage Report + +
+

< Summary

+
+
+
Information
+
+
+ + + + + + + + + + + + + + + + + +
Class:Utility.Components.GuidGenerator.GuidGenerator
Assembly:Utility
File(s):/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Components/GuidGenerator/GuidGenerator.razor
Tag:106_9081424346
+
+
+
+
+
+
+
Line coverage
+
+
47%
+
+ + + + + + + + + + + + + + + + + + + + + +
Covered lines:26
Uncovered lines:29
Coverable lines:55
Total lines:199
Line coverage:47.2%
+
+
+
+
+
Branch coverage
+
+
50%
+
+ + + + + + + + + + + + + +
Covered branches:4
Total branches:8
Branch coverage:50%
+
+
+
+
+
Method coverage
+
+
+

Feature is only available for sponsors

+Upgrade to PRO version +
+
+
+
+

Metrics

+
+ +++++++ + + + + + + + + + + + + + + + +
MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
OnInitializedAsync()100%11100%
.ctor()100%11100%
CopyZeroGuid()100%210%
RemoveDashesFromZeroGuid()100%22100%
AddBracesToZeroGuid()100%22100%
Update()100%11100%
GenerateNewGuid()100%210%
RemoveDashesFromNewGuid()0%620%
CopyNewGuid()100%210%
GenerateMultipleGuids()0%620%
CopyMultipleGuids()100%210%
DeleteMultipleGuids()100%11100%
+
+

File(s)

+

/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Components/GuidGenerator/GuidGenerator.razor

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#LineLine coverage
 1@using System.Text;
 2@inject IJSRuntime JSRuntime
 3
 4@*@inject ClipboardService ClipboardService*@
 5
 6<div class="container">
 7
 8    <div class="row">
 9        <div class="class">
 10            <h2>Guid</h2>
 11        </div>
 12    </div>
 13
 14    <div class="row">
 15        <label class="label-control">Zero:</label>
 16        <div class="input-group">
 17            <input type="text" id="guidZero" name="guidZero" class="form-control" @bind="@zeroGuid" placeholder="0000000
 18            <span class="input-group-btn">
 19                <button class="btn btn-info" type="button" id="btnGuidZeroCopy" name="btnGuidZeroCopy" @onclick="CopyZer
 20            </span>
 21        </div>
 22    </div>
 23    <div class="row">
 24        <div class="form-check form-check-inline">
 25            <input class="form-check-input" type="checkbox" value="@removeDashes" id="chkRemoveDashesZero"
 426                   @onchange="@(eventArgs => { removeDashes = (bool)eventArgs.Value; Update(); })"/>
 27            <label class="form-check-label" for="chkRemoveDashesZero">
 28                Remove Dashes
 29            </label>
 30        </div>
 31        &nbsp;|&nbsp;
 32        <div class="form-check form-check-inline">
 33            <input class="form-check-input" type="checkbox" value="@addBraces" id="chkAddBracesZero"
 434                   @onchange="@(eventArgs => { addBraces = (bool)eventArgs.Value; Update(); })"/>
 35            <label class="form-check-label" for="chkAddBracesZero">
 36                Add Braces
 37            </label>
 38        </div>
 39    </div>
 40    <div class="row">
 41        <label class="label-control">New:</label>
 42        <div class="input-group">
 43            <span class="input-group-btn">
 44                <button class="btn btn-info" type="button" id="btnGuidNewCreate" name="btnGuidNewCreate" @onclick="Gener
 45            </span>
 46            <input type="text" id="newGuid" name="newGuid" class="form-control" value="@newGuid" placeholder="00000000-0
 47            <input type="hidden" id="newGuidHidden" name="newGuidHidden" class="form-control" value="@newGuidHidden" pla
 48            <span class="input-group-btn">
 49                <button class="btn btn-info" type="button" id="btnNewGuidCopy" name="btnNewGuidCopy" @onclick="CopyNewGu
 50            </span>
 51        </div>
 52    </div>
 53    <div class="row">
 54        <div class="form-check">
 55            <input class="form-check-input" type="checkbox" value="@removeDashesNew" id="chkRemoveDashes"
 056                   @onchange="@(eventArgs => { removeDashesNew = (bool)eventArgs.Value; RemoveDashesFromNewGuid(); })">
 57            <label class="form-check-label" for="chkRemoveDashes">
 58                Remove Dashes
 59            </label>
 60        </div>
 61    </div>
 62    <hr/>
 63    <div class="row">
 64        <label class="label-control">How many Guids do you wish to generate:</label>
 65        <div class="input-group">
 66            <div class="form-check">
 67                <input class="form-check-input" type="checkbox" value="" id="chkRemoveDashesMultiple">
 68                <label class="form-check-label" for="chkRemoveDashesMultiple">
 69                    Remove Dashes
 70                </label>
 71            </div>
 72        </div>
 73        <div class="input-group">
 74            <input type="number" class="form-control" id="guidCount" name="guidCount" @bind="@guidCount">
 75            <span class="input-group-btn">
 76                <button class="btn btn-success" type="button" id="btnGuidNewCreateMultiple" name="btnGuidNewCreateMultip
 77                        @onclick="GenerateMultipleGuids">Go!</button>
 78                <button class="btn btn-info" type="button" id="btnGuidMultipleCopy" name="btnGuidMultipleCopy"
 79                        @onclick="CopyMultipleGuids">
 80                    <i class="far fa-copy"></i>
 81                </button>
 82                <button class="btn btn-danger" type="button" id="btnGuidMultipleClear" name="btnGuidMultipleClear"
 83                        @onclick="DeleteMultipleGuids">
 84                    <i class="far fa-trash-alt"></i>
 85                </button>
 86            </span>
 87        </div>
 88    </div>
 89    <div class="row">
 90        <textarea id="guids" class="form-control" @bind="NewGuids"></textarea>
 91    </div>
 92</div>
 93
 94@code {
 95
 96    private string newGuid;
 97    private Guid newGuidHidden;
 98    private int guidCount;
 99
 100    protected override async Task OnInitializedAsync()
 5101    {
 5102        var guid = Guid.NewGuid();
 5103        newGuid = guid.ToString();
 5104        newGuidHidden = guid;
 105
 5106        guidCount = 5;
 5107    }
 108
 109    #region Zero
 110
 5111    private Guid defaultZeroGuid = new Guid(); //"00000000000000000000000000000000" //"00000000-0000-0000-0000-000000000
 5112    private string zeroGuid = new Guid().ToString();
 113
 114    async Task CopyZeroGuid()
 0115    {
 0116        await JSRuntime.InvokeVoidAsync("navigator.clipboard.writeText", zeroGuid);
 0117    }
 118
 5119    private bool removeDashes = false;
 120    void RemoveDashesFromZeroGuid()
 2121    {
 2122        zeroGuid = (removeDashes) ? defaultZeroGuid.ToString().Replace("-", "") : defaultZeroGuid.ToString();
 2123    }
 124
 5125    private bool addBraces = false;
 126    void AddBracesToZeroGuid()
 2127    {
 2128        zeroGuid = (addBraces) ? $"{{{zeroGuid}}}" : zeroGuid.Replace("{", "").Replace("}", "");
 2129    }
 130
 131    void Update()
 2132    {
 2133        RemoveDashesFromZeroGuid();
 2134        AddBracesToZeroGuid();
 2135    }
 136
 137    #endregion Zero
 138
 139    #region New
 140
 141    void GenerateNewGuid()
 0142    {
 0143        var guid = Guid.NewGuid();
 0144        newGuid = guid.ToString();
 0145        newGuidHidden = guid;
 0146        RemoveDashesFromNewGuid();
 0147    }
 148
 5149    private bool removeDashesNew = false;
 150    void RemoveDashesFromNewGuid()
 0151    {
 0152        newGuid = (removeDashesNew) ? newGuidHidden.ToString().Replace("-", "") : newGuidHidden.ToString();
 153        //removeDashes = !removeDashes;
 0154    }
 155
 156    async Task CopyNewGuid()
 0157    {
 0158        await JSRuntime.InvokeVoidAsync("navigator.clipboard.writeText", newGuid);
 0159    }
 160
 161    #endregion New
 162
 163    #region Multiple
 164
 165    string NewGuids;
 166
 167    async Task GenerateMultipleGuids()
 0168    {
 0169        NewGuids = string.Empty; //Checkbox to append?
 170
 0171        StringBuilder builder = new StringBuilder();
 0172        for (int i = 0; i < guidCount; i++)
 0173        {
 0174            var guid = System.Guid.NewGuid().ToString() + System.Environment.NewLine;
 175
 176            //if (RemoveDashesMultiple)
 177            ///{
 178            //    guid = Regex.Replace(guid, @"\-", "");
 179            //}
 180
 0181            builder.Append(guid);
 0182        }
 183
 0184        NewGuids = builder.ToString();
 0185    }
 186
 187    async Task CopyMultipleGuids()
 0188    {
 0189        await JSRuntime.InvokeVoidAsync("navigator.clipboard.writeText", NewGuids);
 0190    }
 191
 192    async Task DeleteMultipleGuids()
 1193    {
 1194        NewGuids = string.Empty;
 1195    }
 196
 197    #endregion Multiple
 198
 199}
+
+
+
+ +
+ + \ No newline at end of file diff --git a/coverage/Utility_HCF.html b/coverage/Utility_HCF.html new file mode 100644 index 00000000..d8090ca3 --- /dev/null +++ b/coverage/Utility_HCF.html @@ -0,0 +1,1419 @@ + + + + + + + +Utility.Components.HCF.HCF - Coverage Report + +
+

< Summary

+
+
+
Information
+
+
+ + + + + + + + + + + + + + + + + +
Class:Utility.Components.HCF.HCF
Assembly:Utility
File(s):/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Components/HCF/HCF.razor
Tag:106_9081424346
+
+
+
+
+
+
+
Line coverage
+
+
0%
+
+ + + + + + + + + + + + + + + + + + + + + +
Covered lines:0
Uncovered lines:134
Coverable lines:134
Total lines:267
Line coverage:0%
+
+
+
+
+
Branch coverage
+
+
0%
+
+ + + + + + + + + + + + + +
Covered branches:0
Total branches:34
Branch coverage:0%
+
+
+
+
+
Method coverage
+
+
+

Feature is only available for sponsors

+Upgrade to PRO version +
+
+
+
+

Metrics

+
+ +++++++ + + + + + + + + + + + +
MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
BuildRenderTree(...)100%210%
OnInitializedAsync()100%210%
Encode()100%210%
Decode()100%210%
parseWhitespace(...)0%7280%
isRegularUnicodeCharacter(...)100%210%
htmlChar(...)0%7280%
text2html(...)0%342180%
+
+

File(s)

+

/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Components/HCF/HCF.razor

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#LineLine coverage
 1@using System.IO
 2@using System.Text
 3@using System.Text.RegularExpressions
 4
 5<div class="container">
 6    <div class="row">
 7        <div class="col">
 8            <p><a href="https://www.soscisurvey.de/tools/view-chars.php" target="_blank">View non-printable unicode char
 9            <p><a href="https://github.com/BurninLeo/see-non-printable-characters/blob/main/view-chars.php"target="_blan
 10        </div>
 11    </div>
 12
 13    <div class="row">
 14        <div class="col">
 15            <h2>View non-printable unicode characters</h2>
 16            <p>Online tool to display non-printable characters that may be hidden in copy&pasted strings.</p>
 17        </div>
 18    </div>
 19    <div class="row">
 20        <div class="col">
 21            <label for="s">Please paste the string here:</label>
 22            <textarea id="s" name="s" class="form-control" rows="8" cols="40"
 23                @bind="s" style="width: 100%; box-sizing: border-box;"></textarea>
 24        </div>
 25    </div>
 26    <div class="row">
 27        <div class="col">
 28            <button id="btnEncode" name="btnEncode" class="btn btn-success float-right" @onclick="Encode"> Show me the c
 29        </div>
 30    </div>
 31
 32    <div class="row">
 33        <div class="col">
 34            @* <div class="output">
 35                @((MarkupString)output)
 36            </div> *@
 37
 038            @((MarkupString)output)
 39
 40            <p># characters, # bytes</p>
 41        </div>
 42    </div>
 43
 44    <div class="row">
 45        <div class="col">
 46            <div class="output2">
 47                <span class="S2Tooltip anchor">S</span>
 48                <span class="S2Tooltip container">
 49                    <span class="S2Tooltip tiptext rounded shadow">83<br>0x53</span>
 50                </span>
 51                <span class="hex S2Tooltip anchor">U+A0</span>
 52                <span class="S2Tooltip container">
 53                    <span class="S2Tooltip tiptext rounded shadow">&amp;#160;<br>\u00A0</span>
 54                </span>
 55            </div>
 56        </div>
 57    </div>
 58
 59    <div class="row">
 60        <div class="col">
 61
 62            <h2>Helpful Sites for Details on UTF Characters</h2>
 63            <ul>
 64                <li><a href="https://www.branah.com/unicode-converter" target="_blank">Branah.com Unicode Converter</a><
 65                <li><a href="http://www.fileformat.info/info/unicode/char/search.htm" target="_blank">FileFormat.Info</a
 66                <li><a href="http://utf8-chartable.de/unicode-utf8-table.pl" target="_blank">utf8-chartable.de</a></li>
 67            </ul>
 68
 69        </div>
 70    </div>
 71
 72</div>
 73
 74@code {
 75    string s;
 76    string output;
 77
 78    protected override async Task OnInitializedAsync()
 079    {
 80        @* s = "See what's hidden in your string…  or be​hind"; *@
 81        //s = "See\u00A0what\'s hidden in your string\u2026\tor be\\u200Bhind\uFEFF";
 082        s = "a …  ​⟶b";
 083        output = string.Empty;
 84        @* var conversion = htmlChar("S"); *@
 85        //var conversion = htmlChar("⟶");
 086        var conversion = htmlChar("a …  ​⟶b");
 087        Console.WriteLine($"Conversion: {conversion}");
 088        output = conversion;
 089    }
 90
 91    private void Encode()
 092    {
 093        var writer = new StringWriter();
 94        @* output = "abc"; // writer.ToString(); *@
 95
 096        var html = text2html(s);
 097        output = html;
 098    }
 99
 100    private void Decode()
 0101    {
 0102        s = "";
 0103    }
 104
 105    private string parseWhitespace(string c)
 0106    {
 0107        var symbol = "";
 0108        if (c == "\r")
 0109        {
 0110            symbol = "<span class='symbol S2Tooltip anchor'>CR</span>";
 0111        }
 0112        else if (c == "\n")
 0113        {
 0114            symbol = "<span class='symbol S2Tooltip anchor'>LF</span>";
 0115        }
 0116        else if (c == "\t")
 0117        {
 0118            symbol = "<span class='symbol S2Tooltip anchor'>⟶</span>&#8203;";
 0119        }
 0120        else if (c == " ")
 0121        {
 0122            symbol = "<span class='white S2Tooltip anchor'>·</span>&#8203;";
 0123        }
 0124        return symbol;
 0125    }
 126
 127    // Checks that the character is not in other or seperator groups.
 128    private bool isRegularUnicodeCharacter(string c)
 0129    {
 130
 0131        Console.WriteLine($"isRegularUnicodeCharacter Character: {c}");
 132
 133        //\p{M}\p{N}\p{P}\p{S}
 0134        var pattern = @"[\p{L}\p{M}\p{N}\p{P}\p{S}]";
 0135        Regex rx = new Regex(pattern);
 0136        MatchCollection matches = rx.Matches(c);
 137
 0138        Console.WriteLine($"isRegularUnicodeCharacter Character: {matches.Count}");
 139
 0140        return matches.Count > 0;
 0141    }
 142
 143    private string htmlChar(string c)
 0144    {
 0145        var desc = "";
 0146        var hex = "";
 147
 148        //var theSize = System.Runtime.InteropServices.Marshal.SizeOf(c);
 149        //Console.WriteLine($"Size: {theSize}")
 150
 0151        Console.WriteLine($"Length: {c.Length}");
 0152        var bytes = Encoding.UTF8.GetBytes(c);
 0153        Console.WriteLine($"Byte Length: {bytes.Length}");
 154
 0155        if (bytes.Length == 1)
 0156        {
 0157            var c1 = char.Parse(c);
 0158            desc = Convert.ToByte(c1) + "<br>\r\n" + String.Format("0x{0,2:X2}", (Convert.ToByte(c1)));
 0159            hex = String.Format("{0,2:X2}", (Convert.ToByte(c1)));
 0160        }
 161        else
 0162        {
 163            //@* $n = unpack('V', iconv('UTF-8', 'UCS-4LE', $c))[1]; *@
 164            // unassigned long
 165
 0166            bytes = Encoding.UTF8.GetBytes(c);
 167            //var bytes = BitConverter.GetBytes(c);
 0168            var isLittleEndian = BitConverter.IsLittleEndian;
 0169            if (isLittleEndian) {
 0170                Array.Reverse(bytes);
 0171            }
 172
 0173            desc = $"&amp;#{bytes.Select(x => (int)x).Sum()};<br>";
 0174            hex = "\\u" + BitConverter.ToString(bytes).Replace("-", String.Empty); // \u00A0
 0175        }
 176
 0177        Console.WriteLine($"CHAR: {c}");
 0178        Console.WriteLine($"DESC: {desc}");
 0179        Console.WriteLine($"HEX: {hex}");
 180
 0181        var symbol = parseWhitespace(c);
 182        // If symbol is not a whitespace char.
 0183        if (symbol == String.Empty)
 0184        {
 0185            var isRegularCharacter = isRegularUnicodeCharacter(c);
 186
 0187            if (isRegularCharacter)
 0188            {
 0189                symbol = "<span class='S2Tooltip anchor'>" + c + "</span>";
 0190            }
 191            else
 0192            {
 0193                symbol = "<span class='hex S2Tooltip anchor'>" + hex + "</span>";
 0194            }
 0195        }
 196
 0197        return symbol +
 0198            "<span class='S2Tooltip container'>" +
 0199            "<span class='S2Tooltip tiptext rounded shadow'>" + desc + "</span>" +
 0200            "</span>";
 0201    }
 202
 203    private string text2html(string s)
 0204    {
 205        // UTF-8 global?
 0206        var html = "<div class='output'>" + "\r\n";
 207
 0208        var sl = s.Length;
 0209        var nlc = 0;
 210
 211        // \n = LF (Line Feed) // Used as a new line character on Unix
 212        // \r = CR (Carriage Return) // Used as a new line character on Mac
 213        // \r\n = CR + LF // Used as a new line character on Windows
 214        // (char)13 = \r = CR
 215        // Environment.NewLine = any of the above code based on the operating system
 216
 0217        for (var i=0; i < sl; i++)
 0218        {
 0219            var c = s.Substring(i, 1); // Get Character from string at position.
 220
 221            //if and else is to deal with newline characters.
 0222            if (c == "\r")
 0223            {
 0224                if (nlc == 0)
 0225                {
 0226                    nlc = 1;
 0227                  html += htmlChar(c);
 0228                }
 0229                else if (nlc == 1)
 0230                {
 0231                    html += "<br>" + "\r\n" + htmlChar(c);
 0232                  nlc = 1;
 0233                }
 0234                else if (nlc == 2) {
 0235                  html += htmlChar(c) + "<br>" + "\r\n";
 0236                  nlc = 0;
 0237              }
 0238            }
 0239            else if (c == "\n")
 0240            {
 0241                var sym = htmlChar(c);
 242
 0243                if (nlc == 0)
 0244                {
 0245                  nlc = 2;
 0246                  html += sym;
 0247              }
 0248                else if (nlc == 2)
 0249                {
 0250                  html += "<br>" + "\r\n" + htmlChar(c);
 0251                  nlc = 2;
 0252              }
 0253                else if (nlc == 1)
 0254                {
 0255                  html += htmlChar(c) + "<br>" + "\r\n";
 0256                  nlc = 0;
 0257              }
 0258            }
 259            else
 0260            {
 0261              html += htmlChar(c);
 0262          }
 0263        }
 264
 0265        return html + "</div>" + "\r\n";
 0266    }
 267}
+
+
+
+ +
+ + \ No newline at end of file diff --git a/coverage/Utility_HTMLEncodeDecode.html b/coverage/Utility_HTMLEncodeDecode.html new file mode 100644 index 00000000..23538052 --- /dev/null +++ b/coverage/Utility_HTMLEncodeDecode.html @@ -0,0 +1,1225 @@ + + + + + + + +Utility.Components.HTMLEncodeDecode.HTMLEncodeDecode - Coverage Report + +
+

< Summary

+
+
+
Information
+
+
+ + + + + + + + + + + + + + + + + +
Class:Utility.Components.HTMLEncodeDecode.HTMLEncodeDecode
Assembly:Utility
File(s):/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Components/HTMLEncodeDecode/HTMLEncodeDecode.razor
Tag:106_9081424346
+
+
+
+
+
+
+
Line coverage
+
+
66%
+
+ + + + + + + + + + + + + + + + + + + + + +
Covered lines:12
Uncovered lines:6
Coverable lines:18
Total lines:75
Line coverage:66.6%
+
+
+
+
+
Branch coverage
+
+
N/A
+
+ + + + + + + + + + + + + +
Covered branches:0
Total branches:0
Branch coverage:N/A
+
+
+
+
+
Method coverage
+
+
+

Feature is only available for sponsors

+Upgrade to PRO version +
+
+
+
+

Metrics

+
+ +++++++ + + + + + + + + + + +
MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
BuildRenderTree(...)100%11100%
get_Decoded()100%11100%
get_Encoded()100%11100%
OnInitializedAsync()100%11100%
Encode()100%11100%
Decode()100%210%
Copy()100%210%
+
+

File(s)

+

/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Components/HTMLEncodeDecode/HTMLEncodeDecode.razor

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#LineLine coverage
 1@using System.IO;
 2@using System.Net;
 3
 4@inject IJSRuntime JSRuntime
 5
 6<div class="container">
 7
 8    <div class="row">
 9        <div class="col">
 10            <h2>HTML Encode / Decode</h2>
 11        </div>
 12    </div>
 13
 14    <div class="row">
 15        <div class="col">
 16            <textarea id="decoded" class="form-control" rows="5" @bind="Decoded"></textarea>
 17        </div>
 18    </div>
 19    <div class="row">
 20        <div class="col">
 21            <button id="btnEncode" name="btnEncode" class="btn btn-success float-right" @onclick="Encode">Encode</button
 22       </div>
 23    </div>
 24    <div class="row">
 25        <div class="col">
 26            <div class="input-group">
 27                <textarea id="encoded" class="form-control" rows="5" @bind="Encoded"></textarea>
 28                <span class="input-group-btn">
 29                    <button id="btnCopySQLBuilder" name="btnCopySQLBuilder" class="btn btn-info" @onclick="Copy"><i clas
 30                </span>
 31            </div>
 32        </div>
 33    </div>
 34    <div class="row">
 35        <div class="col">
 36            <button id="btnDecode" name="btnDecode" class="btn btn-success float-right" @onclick="Decode">Decode</button
 37        </div>
 38    </div>
 39    <div class="row">
 40        <div class="col">
 241            <div>@((MarkupString)Encoded)</div>
 42        </div>
 43    </div>
 44</div>
 45
 46@code {
 47    [Parameter]
 748    public string Decoded { get; set; }
 49
 50    [Parameter]
 1051    public string Encoded { get; set; }
 52
 53    protected override async Task OnInitializedAsync()
 154    {
 155        Decoded = "&lt;html&gt;&lt;body&gt;&lt;h1&gt;Hello&lt;/h1&gt;&lt;/body&gt;&lt;/html&gt;";
 156        Encoded = string.Empty;
 157    }
 58
 59    private void Encode()
 160    {
 161        var writer = new StringWriter();
 162        WebUtility.HtmlDecode(Decoded, writer);
 163        Encoded = writer.ToString();
 164    }
 65
 66    private void Decode()
 067    {
 068        Decoded = WebUtility.HtmlEncode(Encoded);
 069    }
 70
 71    async Task Copy()
 072    {
 073        await JSRuntime.InvokeVoidAsync("navigator.clipboard.writeText", Encoded);
 074    }
 75}
+
+
+
+ +
+ + \ No newline at end of file diff --git a/coverage/Utility_HexToRGB.html b/coverage/Utility_HexToRGB.html new file mode 100644 index 00000000..343b1949 --- /dev/null +++ b/coverage/Utility_HexToRGB.html @@ -0,0 +1,1229 @@ + + + + + + + +Utility.Components.HexToRGB.HexToRGB - Coverage Report + +
+

< Summary

+
+
+
Information
+
+
+ + + + + + + + + + + + + + + + + +
Class:Utility.Components.HexToRGB.HexToRGB
Assembly:Utility
File(s):/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Components/HexToRGB/HexToRGB.razor
Tag:106_9081424346
+
+
+
+
+
+
+
Line coverage
+
+
0%
+
+ + + + + + + + + + + + + + + + + + + + + +
Covered lines:0
Uncovered lines:13
Coverable lines:13
Total lines:87
Line coverage:0%
+
+
+
+
+
Branch coverage
+
+
N/A
+
+ + + + + + + + + + + + + +
Covered branches:0
Total branches:0
Branch coverage:N/A
+
+
+
+
+
Method coverage
+
+
+

Feature is only available for sponsors

+Upgrade to PRO version +
+
+
+
+

Metrics

+
+ +++++++ + + + + + + +
MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
BuildRenderTree(...)100%210%
.ctor()100%210%
ConvertColour()100%210%
+
+

File(s)

+

/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Components/HexToRGB/HexToRGB.razor

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#LineLine coverage
 1@using System
 2@using System.Drawing
 3
 4<div class="container">
 5    <div class="row">
 6        <div class="col">
 7
 8            <label class="label-control">Hex:</label>
 9            <div class="input-group">
 10                <input type="color" id="colour" name="colour" class="form-control" @bind="Colour">
 11                <span class="input-group-btn">
 12                    <button class="btn btn-info" type="button" id="btnConvert" name="btnConvert" @onclick="ConvertColour
 13                </span>
 14            </div>
 15
 16        </div>
 17    </div>
 18
 19    <div class="row">
 20        <div class="col">
 21            <label class="label-control">Hex:</label>
 022            <label class="label-control" id="colourId">@ColourId</label>
 23        </div>
 24    </div>
 25
 26    <br />
 27
 28    <div class="row">
 29        <div class="col">
 30            <div class="form-group">
 31                <label for="rgbRed" class="control-label col-xs-3">🔴Red:</label>
 32                <div class="col-xs-9">
 33                    <input type="number" class="form-control" id="rgbRed" placeholder="🔴" @bind="Red">
 34                </div>
 35            </div>
 36        </div>
 37        <div class="col">
 38            <div class="form-group">
 39                <label for="rgbGreen" class="control-label col-xs-3">🟢Green:</label>
 40                <div class="col-xs-9">
 41                    <input type="number" class="form-control" id="rgbGreen" placeholder="🟢" @bind="Green">
 42                </div>
 43            </div>
 44        </div>
 45        <div class="col">
 46            <div class="form-group">
 47                <label for="rgbBlue" class="control-label col-xs-3">🔵Blue:</label>
 48                <div class="col-xs-9">
 49                    <input type="number" class="form-control" id="rgbBlue" placeholder="🔵" @bind="Blue">
 50                </div>
 51            </div>
 52        </div>
 53
 54    </div>
 55
 56    <hr />
 57
 58    <div class="row">
 59        <div class="col">
 60            <p>See mac one: <a href="https://github.com/AlexHedley/HEXtoObjCColor" target="_blank">HEXtoObjCColor</a>.</
 61        </div>
 62    </div>
 63</div>
 64
 65@code {
 066    string Colour = "#26264C";
 067    string ColourId = "#";
 68
 069    int Red = 0;
 070    int Green = 0;
 071    int Blue = 0;
 72
 73    // void UpdateColourLabel()
 74    // {
 75    //     ColourId = Colour;
 76    // }
 77
 78    void ConvertColour()
 079    {
 080        ColourId = Colour;
 081        System.Drawing.Color color = ColorTranslator.FromHtml(Colour);
 082        Red = Convert.ToInt16(color.R);
 083        Green = Convert.ToInt16(color.G);
 084        Blue = Convert.ToInt16(color.B);
 085    }
 86
 87}
+
+
+
+ +
+ + \ No newline at end of file diff --git a/coverage/Utility_HextoDec.html b/coverage/Utility_HextoDec.html new file mode 100644 index 00000000..0622cf22 --- /dev/null +++ b/coverage/Utility_HextoDec.html @@ -0,0 +1,1198 @@ + + + + + + + +Utility.Components.HextoDec.HextoDec - Coverage Report + +
+

< Summary

+
+
+
Information
+
+
+ + + + + + + + + + + + + + + + + +
Class:Utility.Components.HextoDec.HextoDec
Assembly:Utility
File(s):/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Components/HextoDec/HextoDec.razor
Tag:106_9081424346
+
+
+
+
+
+
+
Line coverage
+
+
0%
+
+ + + + + + + + + + + + + + + + + + + + + +
Covered lines:0
Uncovered lines:8
Coverable lines:8
Total lines:56
Line coverage:0%
+
+
+
+
+
Branch coverage
+
+
N/A
+
+ + + + + + + + + + + + + +
Covered branches:0
Total branches:0
Branch coverage:N/A
+
+
+
+
+
Method coverage
+
+
+

Feature is only available for sponsors

+Upgrade to PRO version +
+
+
+
+

Metrics

+
+ +++++++ + + + + + + +
MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor()100%210%
ConvertToDecimal()100%210%
ConvertToHex()100%210%
+
+

File(s)

+

/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Components/HextoDec/HextoDec.razor

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#LineLine coverage
 1<div class="container">
 2
 3    <div class="row">
 4        <div class="col">
 5            <h2>HEX to DEC</h2>
 6        </div>
 7    </div>
 8
 9    <div class="row">
 10        <div class="col">
 11
 12            <div class="input-group">
 13                <div class="input-group-prepend">
 14                    <span class="input-group-text">Hex:</span>
 15                </div>
 16                <input id="hex" name="hex" class="form-control" @bind="hex">
 17                <span class="input-group-btn">
 18                    <button id="ConvertToDecimal" name="ConvertToDecimal" @onclick="ConvertToDecimal" class="btn btn-suc
 19                </span>
 20            </div>
 21
 22        </div>
 23    </div>
 24
 25    <div class="row">
 26        <div class="col">
 27
 28            <div class="input-group">
 29                <div class="input-group-prepend">
 30                    <span class="input-group-text">Dec:</span>
 31                </div>
 32                <input id="dec" name="dec" class="form-control" @bind="dec">
 33                <div class="input-group-append">
 34                    <button id="ConvertToHex" name="ConvertToHex" @onclick="ConvertToHex" class="btn btn-success float-r
 35                </div>
 36            </div>
 37
 38        </div>
 39    </div>
 40
 41</div>
 42
 43@code {
 044    string hex = "12";
 045    int dec = 0;
 46
 47    private void ConvertToDecimal()
 048    {
 049        dec = int.Parse(hex, System.Globalization.NumberStyles.HexNumber);
 050    }
 51
 52    private void ConvertToHex()
 053    {
 054        hex = dec.ToString("X");
 055    }
 56}
+
+
+
+
+

Methods/Properties

+.ctor()
+ConvertToDecimal()
+ConvertToHex()
+
+
+ + \ No newline at end of file diff --git a/coverage/Utility_Index.html b/coverage/Utility_Index.html new file mode 100644 index 00000000..9ded844a --- /dev/null +++ b/coverage/Utility_Index.html @@ -0,0 +1,1189 @@ + + + + + + + +Utility.Pages.Index - Coverage Report + +
+

< Summary

+
+
+
Information
+
+
+ + + + + + + + + + + + + + + + + +
Class:Utility.Pages.Index
Assembly:Utility
File(s):/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Pages/Index.razor
Tag:106_9081424346
+
+
+
+
+
+
+
Line coverage
+
+
0%
+
+ + + + + + + + + + + + + + + + + + + + + +
Covered lines:0
Uncovered lines:4
Coverable lines:4
Total lines:49
Line coverage:0%
+
+
+
+
+
Branch coverage
+
+
N/A
+
+ + + + + + + + + + + + + +
Covered branches:0
Total branches:0
Branch coverage:N/A
+
+
+
+
+
Method coverage
+
+
+

Feature is only available for sponsors

+Upgrade to PRO version +
+
+
+
+

Metrics

+
+ +++++++ + + + + + +
MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor()100%210%
IncrementCount()100%210%
+
+

File(s)

+

/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Pages/Index.razor

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#LineLine coverage
 1@page "/"
 2
 3<PageTitle>Index</PageTitle>
 4
 5<h1>Utility</h1>
 6
 7<ul>
 8    <li><a href="urls">Url Encode</a></li>
 9    <li><a href="urls">Url</a></li>
 10    <li><a href="guid">Guid</a></li>
 11    <li><a href="sql">SQL</a></li>
 12    <li><a href="html">HTML</a></li>
 13    <li><a href="markdown">Markdown</a></li>
 14    <li><a href="timerstopwatch">Timer / Stopwatch</a></li>
 15    <li><a href="ascii">Ascii</a></li>
 16    <li><a href="colourconverter">Colour Converter (HEX to RGB)</a></li>
 17    <li><a href="binary">Binary</a></li>
 18    <li><a href="stringconverter">String</a></li>
 19    <li><a href="stringconverter">Base64 Encode/Decode</a></li>
 20    <li><a href="epoch">Epoch</a></li>
 21    <li><a href="converter">time converter</a></li>
 22    <li><a href="converter">kb - mb - gb converter</a></li>
 23    <li><a href="converter">HEX to DEC</a></li>
 24    <li><a href="jwt">JWT</a></li>
 25    <li><a href="luhn">Luhn</a></li>
 26    <li><a href="hcf">Hidden Char Finder</a></li>
 27    <li><a href="codeeditor">Monaco Editor</a></li>
 28</ul>
 29
 30<ul>
 31    <li><a href="jwt">JWT</a> (JWT)</li>
 32    <li><a href="unicode">Unicode</a> (WIP)</li>
 33    <li><a href="diffeditor">Diff Editor</a> (WIP)</li>
 34    <li><a href="stringconverter">Remove whitespace</a></li>
 35    <li><a href="stringconverter">HEX to DEC</a></li>
 36</ul>
 37
 38<ul>
 39    <li><a href="cryptography">Cryptography</a> ⛔️</li>
 40</ul>
 41
 42@code {
 043    private int currentCount = 0;
 44
 45    private void IncrementCount()
 046    {
 047        currentCount++;
 048    }
 49}
+
+
+
+
+

Methods/Properties

+.ctor()
+IncrementCount()
+
+
+ + \ No newline at end of file diff --git a/coverage/Utility_JWTDebugger.html b/coverage/Utility_JWTDebugger.html new file mode 100644 index 00000000..60332d26 --- /dev/null +++ b/coverage/Utility_JWTDebugger.html @@ -0,0 +1,1239 @@ + + + + + + + +Utility.Components.JWTDebugger.JWTDebugger - Coverage Report + +
+

< Summary

+
+
+
Information
+
+
+ + + + + + + + + + + + + + + + + +
Class:Utility.Components.JWTDebugger.JWTDebugger
Assembly:Utility
File(s):/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Components/JWTDebugger/JWTDebugger.razor
Tag:106_9081424346
+
+
+
+
+
+
+
Line coverage
+
+
63%
+
+ + + + + + + + + + + + + + + + + + + + + +
Covered lines:12
Uncovered lines:7
Coverable lines:19
Total lines:87
Line coverage:63.1%
+
+
+
+
+
Branch coverage
+
+
100%
+
+ + + + + + + + + + + + + +
Covered branches:2
Total branches:2
Branch coverage:100%
+
+
+
+
+
Method coverage
+
+
+

Feature is only available for sponsors

+Upgrade to PRO version +
+
+
+
+

Metrics

+
+ +++++++ + + + + + + + + + + + +
MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Input()100%11100%
get_Output()100%210%
get_Header()100%11100%
get_Payload()100%11100%
get_Signature()100%11100%
Decode()100%22100%
Clear()100%210%
Copy()100%210%
+
+

File(s)

+

/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Components/JWTDebugger/JWTDebugger.razor

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#LineLine coverage
 1@using System.Text
 2@using System.IdentityModel.Tokens.Jwt
 3@inject IJSRuntime JSRuntime
 4
 5<div class="container">
 6    <div class="row">
 7        <div class="col">
 8            <h2>JWT Debugger</h2>
 9        </div>
 10    </div>
 11
 12    <div class="row">
 13        <div class="col">
 14            <label class="label-control" for="algorithm-select">Algorithm:</label>
 15            <select id="algorithm-select" name="algorithm-select" class="form-control" >
 16                <option name="algorithm" value="HS256" selected="">HS256</option>
 17            </select>
 18        </div>
 19    </div>
 20
 21    <div class="row">
 22        <div class="col">
 23            <div class="input-group">
 24                <textarea id="Input" class="form-control" rows="5" @bind="Input" placeholder="JWT"></textarea>
 25                <span class="input-group-btn">
 26                    <button id="btnDecode" name="btnDecode" class="btn btn-success" @onclick="Decode"><i class="fas fa-a
 27                    <button id="btnClear" name="btnClear" class="btn btn-danger float-right" @onclick="Clear"><i class="
 28                </span>
 29            </div>
 30        </div>
 31        <div class="col">
 32            <p>HEADER:ALGORITHM & TOKEN TYPE</p>
 33            <textarea id="Header" class="form-control" rows="5" @bind="Header" placeholder="DECODED"></textarea>
 34            <p>PAYLOAD:DATA</p>
 35            <textarea id="Payload" class="form-control" rows="5" @bind="Payload" placeholder="DECODED"></textarea>
 36            <p>VERIFY SIGNATURE</p>
 37            <textarea id="VerifySignature" class="form-control" rows="5" @bind="Signature" placeholder="DECODED"></texta
 38        </div>
 39    </div>
 40
 41    <div class="row">
 42        <div class="col">
 43            <p>Inspired from <a href="https://jwt.io" target="_blank">JWT.io</a>.</p>
 44        </div>
 45    </div>
 46
 47</div>
 48
 49@code {
 50    [Parameter]
 851    public string? Input { get; set; }
 52
 53    [Parameter]
 054    public string? Output { get; set; }
 55
 56    [Parameter]
 657    public string Header { get; set; }
 58
 59    [Parameter]
 660    public string Payload { get; set; }
 61
 62    [Parameter]
 663    public string Signature { get; set; }
 64
 65    // protected override void OnInitialized() {}
 66
 67    void Decode()
 168    {
 169        if (string.IsNullOrEmpty(Input)) return;
 70
 171        var handler = new JwtSecurityTokenHandler();
 172        var jwtSecurityToken = handler.ReadJwtToken(Input);
 173        Header = jwtSecurityToken.Header.SerializeToJson();
 174        Payload = jwtSecurityToken.Payload.SerializeToJson();
 175        Signature = jwtSecurityToken.RawSignature;
 176    }
 77
 78    private void Clear()
 079    {
 080        Input = string.Empty;
 081    }
 82
 83    async Task Copy()
 084    {
 085        await JSRuntime.InvokeVoidAsync("navigator.clipboard.writeText", Output);
 086    }
 87}
+
+
+
+ +
+ + \ No newline at end of file diff --git a/coverage/Utility_LuhnChecker.html b/coverage/Utility_LuhnChecker.html new file mode 100644 index 00000000..9cdf6668 --- /dev/null +++ b/coverage/Utility_LuhnChecker.html @@ -0,0 +1,1239 @@ + + + + + + + +Utility.Components.LuhnChecker.LuhnChecker - Coverage Report + +
+

< Summary

+
+
+
Information
+
+
+ + + + + + + + + + + + + + + + + +
Class:Utility.Components.LuhnChecker.LuhnChecker
Assembly:Utility
File(s):/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Components/LuhnChecker/LuhnChecker.razor
Tag:106_9081424346
+
+
+
+
+
+
+
Line coverage
+
+
85%
+
+ + + + + + + + + + + + + + + + + + + + + +
Covered lines:18
Uncovered lines:3
Coverable lines:21
Total lines:89
Line coverage:85.7%
+
+
+
+
+
Branch coverage
+
+
75%
+
+ + + + + + + + + + + + + +
Covered branches:6
Total branches:8
Branch coverage:75%
+
+
+
+
+
Method coverage
+
+
+

Feature is only available for sponsors

+Upgrade to PRO version +
+
+
+
+

Metrics

+
+ +++++++ + + + + + + + + + + +
MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
BuildRenderTree(...)100%11100%
get_check()100%11100%
get_valid()100%11100%
OnInitializedAsync()100%11100%
CheckSingle()100%11100%
ClearSingle()100%210%
LuhnCheck(...)75%88100%
+
+

File(s)

+

/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Components/LuhnChecker/LuhnChecker.razor

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#LineLine coverage
 1@using System.Linq;
 2
 3<div class="container">
 4    <div class="row">
 5        <div class="col">
 6            <div class="input-group">
 7                <input id="luhnCheck" name="luhnCheck" class="form-control" @bind="check" placeholder="378282246310005" 
 8                <span class="input-group-btn">
 9                    <button id="btnLuhnCheckClear" name="btnLuhnCheckClear" class="btn btn-danger float-right" @onclick=
 10                </span>
 11            </div>
 12        </div>
 13    </div>
 14    <div class="row">
 15        <div class="col">
 16            <button id="btnLuhnCheck" name="btnLuhnCheck" class="btn btn-success float-right" @onclick="CheckSingle">Che
 17        </div>
 18    </div>
 19    <div class="row">
 20        <div class="col">
 21            <label class="label-control">Valid?</label>
 422            <label class="label-control" id="luhnCheckLabel">@valid.ToString()</label>
 23        </div>
 24    </div>
 25    @*<div class="row">
 26        <textarea id="luhnChecks" class="form-control" @bind="checks"></textarea>
 27    </div>
 28    <div class="row">
 29        <button id="btnLuhnChecks" name="btnLuhnChecks" class="btn btn-success float-right"
 30                @onclick="CheckMultiple">
 31            Check
 32        </button>
 33        <button id="btnLuhnChecksClear" name="btnLuhnChecksClear" class="btn btn-danger float-right"
 34                @onclick="ClearMultiple">
 35            <i class="far fa-trash-alt"></i>
 36        </button>
 37    </div>*@
 38</div>
 39
 40@code {
 41
 42    [Parameter]
 1243    public string check  { get; set; }
 44
 45    [Parameter]
 1246    public bool valid  { get; set; }
 47    //string checks;
 48
 49    protected override async Task OnInitializedAsync()
 250    {
 51        // check = "378282246310005"; //string.Empty;
 252        valid = false;
 53        // valid = LuhnCheck(check);
 54        //checks = "b"; //string.Empty;
 255    }
 56
 57    private void CheckSingle()
 258    {
 259        valid = LuhnCheck(check);
 260    }
 61
 62    private void ClearSingle()
 063    {
 064        check = string.Empty;
 065    }
 66
 67    @*private void CheckMultiple()
 68    {
 69        var valid = LuhnCheck(check);
 70    }
 71
 72    private void ClearMultiple()
 73    {
 74        checks = string.Empty;
 75    }*@
 76
 77    // https://stackoverflow.com/a/40491537
 78    private static bool LuhnCheck(string digits)
 279    {
 280        if (string.IsNullOrEmpty(digits)) return false;
 81
 282        return digits.All(char.IsDigit) && digits.Reverse()
 1683            .Select(c => c - 48)
 1684            .Select((thisNum, i) => i % 2 == 0
 1685                ? thisNum
 1686                : ((thisNum *= 2) > 9 ? thisNum - 9 : thisNum)
 287            ).Sum() % 10 == 0;
 288    }
 89}
+
+
+
+ +
+ + \ No newline at end of file diff --git a/coverage/Utility_MD5Converter.html b/coverage/Utility_MD5Converter.html new file mode 100644 index 00000000..14db3821 --- /dev/null +++ b/coverage/Utility_MD5Converter.html @@ -0,0 +1,1215 @@ + + + + + + + +Utility.Components.MD5Converter.MD5Converter - Coverage Report + +
+

< Summary

+
+
+
Information
+
+
+ + + + + + + + + + + + + + + + + +
Class:Utility.Components.MD5Converter.MD5Converter
Assembly:Utility
File(s):/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Components/MD5Converter/MD5Converter.razor
Tag:106_9081424346
+
+
+
+
+
+
+
Line coverage
+
+
0%
+
+ + + + + + + + + + + + + + + + + + + + + +
Covered lines:0
Uncovered lines:12
Coverable lines:12
Total lines:73
Line coverage:0%
+
+
+
+
+
Branch coverage
+
+
N/A
+
+ + + + + + + + + + + + + +
Covered branches:0
Total branches:0
Branch coverage:N/A
+
+
+
+
+
Method coverage
+
+
+

Feature is only available for sponsors

+Upgrade to PRO version +
+
+
+
+

Metrics

+
+ +++++++ + + + + + + +
MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor()100%210%
ConvertString()100%210%
CreateMD5(...)100%210%
+
+

File(s)

+

/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Components/MD5Converter/MD5Converter.razor

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#LineLine coverage
 1@using System.Security.Cryptography
 2
 3<div class="container">
 4
 5    <div class="row">
 6        <div class="col">
 7            <p>⛔️<a href="https://learn.microsoft.com/en-us/dotnet/core/compatibility/cryptography/5.0/cryptography-apis
 8            <p><code>System.Security.Cryptography.Algorithms is not supported on this platform.</code></p>
 9        </div>
 10    </div>
 11
 12    <div class="row">
 13        <div class="col">
 14
 15            <label class="label-control">String:</label>
 16            <div class="input-group">
 17                <input id="ascii" name="md5" class="form-control" @bind="md5" placeholder="">
 18                <span class="input-group-btn">
 19                    <button id="btnConvert" name="btnConvert" type="button" class="btn btn-success float-right" @onclick
 20                </span>
 21            </div>
 22
 23        </div>
 24    </div>
 25
 26    <br/>
 27
 28    <div class="row">
 29        <div class="col">
 30            <textarea id="Output" name="Output" class="form-control" rows="5" @bind="Output"></textarea>
 31        </div>
 32    </div>
 33
 34    @* <hr/> *@
 35
 36    @* <div class="row"> *@
 37    @*     <div class="col"> *@
 38    @*         <p>Inspired from <a href="" target="_blank"></a></p> *@
 39    @*     </div> *@
 40    @* </div> *@
 41</div>
 42
 43@code {
 044    string md5 = "";
 045    string Output = string.Empty;
 46
 47    void ConvertString()
 048    {
 049        Output = CreateMD5(md5);
 050    }
 51
 52    // https://stackoverflow.com/a/24031467/2895831
 53    // https://msdn.microsoft.com/en-us/library/system.security.cryptography.md5%28v=vs.110%29.aspx
 54    public static string CreateMD5(string input)
 055    {
 56    // Use input string to calculate MD5 hash
 057        using (MD5 md5 = MD5.Create())
 058        {
 059            byte[] inputBytes = System.Text.Encoding.ASCII.GetBytes(input);
 060            byte[] hashBytes = md5.ComputeHash(inputBytes);
 61
 062            return Convert.ToHexString(hashBytes); // .NET 5 +
 63
 64            // Convert the byte array to hexadecimal string prior to .NET 5
 65            // StringBuilder sb = new System.Text.StringBuilder();
 66            // for (int i = 0; i < hashBytes.Length; i++)
 67            // {
 68            //     sb.Append(hashBytes[i].ToString("X2"));
 69            // }
 70            // return sb.ToString();
 71        }
 072    }
 73}
+
+
+
+ +
+ + \ No newline at end of file diff --git a/coverage/Utility_MainLayout.html b/coverage/Utility_MainLayout.html new file mode 100644 index 00000000..090a1998 --- /dev/null +++ b/coverage/Utility_MainLayout.html @@ -0,0 +1,1221 @@ + + + + + + + +Utility.Shared.MainLayout - Coverage Report + +
+

< Summary

+
+
+
Information
+
+
+ + + + + + + + + + + + + + + + + +
Class:Utility.Shared.MainLayout
Assembly:Utility
File(s):/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Shared/MainLayout.razor
Tag:106_9081424346
+
+
+
+
+
+
+
Line coverage
+
+
0%
+
+ + + + + + + + + + + + + + + + + + + + + +
Covered lines:0
Uncovered lines:20
Coverable lines:20
Total lines:79
Line coverage:0%
+
+
+
+
+
Branch coverage
+
+
0%
+
+ + + + + + + + + + + + + +
Covered branches:0
Total branches:2
Branch coverage:0%
+
+
+
+
+
Method coverage
+
+
+

Feature is only available for sponsors

+Upgrade to PRO version +
+
+
+
+

Metrics

+
+ +++++++ + + + + + + +
MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
OnInitializedAsync()0%620%
LocationChanged()100%210%
System.IDisposable.Dispose()100%210%
+
+

File(s)

+

/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Shared/MainLayout.razor

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#LineLine coverage
 1@implements IDisposable
 2@inherits LayoutComponentBase
 3
 4@inject Blazored.LocalStorage.ILocalStorageService localStorage
 5@inject NavigationManager NavigationManager
 6
 7<FluentLayout>
 8    <FluentHeader>
 9        <div>
 10            Utility
 11        </div>
 12        <FluentSpacer />
 13        <div class="settings">
 14            <SiteSettings />
 15        </div>
 16    </FluentHeader>
 17    <FluentStack Class="main" Orientation="Orientation.Horizontal" Width="100%">
 18        <NavMenu />
 19        <FluentBodyContent Class="body-content">
 20            <ErrorBoundary>
 21                <ChildContent>
 22                    <div class="content">
 023                        @Body
 24                    </div>
 25                </ChildContent>
 26                <ErrorContent Context="ex">
 027                    <div class="blazor-error-boundary">@ex.Message</div>
 28                </ErrorContent>
 29            </ErrorBoundary>
 30            <FluentDialogProvider />
 31        </FluentBodyContent>
 32    </FluentStack>
 33    <FluentFooter>
 34        <div class="link1">
 35            <a href="https://alexhedley.com/Utility-Documentation/" target="_blank">Documentation</a>
 36        </div>
 37        <div class="link2">
 38            <a href="https://alexhedley.com/Utility/" target="_blank">About</a>
 39        </div>
 40    </FluentFooter>
 41</FluentLayout>
 42
 43
 44
 45@code {
 46    // Detecting navigation events
 47    // https://blazor-university.com/routing/detecting-navigation-events/
 48    protected override async Task OnInitializedAsync()
 049    {
 50        // Subscribe to the event
 051        NavigationManager.LocationChanged += LocationChanged;
 52
 053        var name = await localStorage.GetItemAsync<string>(Constants.LOCAL_STORAGE_TAB);
 054        if (!string.IsNullOrEmpty(name))
 055        {
 056            NavigationManager.NavigateTo(name); // Navigate
 057        }
 58
 059        base.OnInitialized();
 060    }
 61
 62    async void LocationChanged(object sender, LocationChangedEventArgs e)
 063    {
 64        // string navigationMethod = e.IsNavigationIntercepted ? "HTML" : "code";
 65        // System.Diagnostics.Debug.WriteLine($"Notified of navigation via {navigationMethod} to {e.Location}");
 66
 067        Uri uri = new Uri(e.Location);
 068        string pathName = uri.AbsolutePath;
 069        var path = pathName.Split(new []{ "/" }, StringSplitOptions.RemoveEmptyEntries);
 70
 071        await localStorage.SetItemAsync(Constants.LOCAL_STORAGE_TAB, path[^1]);
 072    }
 73
 74    void IDisposable.Dispose()
 075    {
 76        // Unsubscribe from the event when our component is disposed
 077        NavigationManager.LocationChanged -= LocationChanged;
 078    }
 79}
+
+
+
+ +
+ + \ No newline at end of file diff --git a/coverage/Utility_MarkdownConverter.html b/coverage/Utility_MarkdownConverter.html new file mode 100644 index 00000000..42852cb7 --- /dev/null +++ b/coverage/Utility_MarkdownConverter.html @@ -0,0 +1,1201 @@ + + + + + + + +Utility.Components.MarkdownConverter.MarkdownConverter - Coverage Report + +
+

< Summary

+
+
+
Information
+
+
+ + + + + + + + + + + + + + + + + +
Class:Utility.Components.MarkdownConverter.MarkdownConverter
Assembly:Utility
File(s):/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Components/MarkdownConverter/MarkdownConverter.razor
Tag:106_9081424346
+
+
+
+
+
+
+
Line coverage
+
+
100%
+
+ + + + + + + + + + + + + + + + + + + + + +
Covered lines:9
Uncovered lines:0
Coverable lines:9
Total lines:59
Line coverage:100%
+
+
+
+
+
Branch coverage
+
+
N/A
+
+ + + + + + + + + + + + + +
Covered branches:0
Total branches:0
Branch coverage:N/A
+
+
+
+
+
Method coverage
+
+
+

Feature is only available for sponsors

+Upgrade to PRO version +
+
+
+
+

Metrics

+
+ +++++++ + + + + + + +
MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_HTML()100%11100%
get_Markdown()100%11100%
Convert()100%11100%
+
+

File(s)

+

/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Components/MarkdownConverter/MarkdownConverter.razor

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#LineLine coverage
 1@using System.Net
 2
 3<div class="container">
 4    <div class="row">
 5        <div class="col">
 6            <h2>Markdown Converter</h2>
 7        </div>
 8    </div>
 9
 10    <div class="row">
 11        <div class="col">
 12            <textarea id="html" class="form-control" rows="5" @bind="HTML"></textarea>
 13        </div>
 14    </div>
 15    <div class="row">
 16        <div class="col">
 17            <button id="btnConvert" name="btnConvert" class="btn btn-success float-right" @onclick="Convert">Convert</bu
 18        </div>
 19    </div>
 20    <div class="row">
 21        <div class="col">
 22            <textarea id="markdown" class="form-control" rows="5" @bind="Markdown"></textarea>
 23        </div>
 24    </div>
 25
 26    <hr/>
 27
 28    <div class="row">
 29        <div class="col">
 30            <p>Powered by <a href="https://github.com/mysticmind/reversemarkdown-net/" target="_blank">ReverseMarkdown</
 31        </div>
 32    </div>
 33</div>
 34
 35@code {
 36    [Parameter]
 2537    public string HTML { get; set; }
 38
 39    [Parameter]
 1940    public string Markdown { get; set; }
 41
 42    // protected override async Task OnInitializedAsync()
 43    // {
 44    //     // html = "&lt;html&gt;&lt;body&gt;&lt;h1&gt;Hello&lt;/h1&gt;&lt;/body&gt;&lt;/html&gt;";
 45    //     HTML = "<html><body><h1>Hello</h1></body></html>";
 46    //     Markdown = string.Empty;
 47    // }
 48
 49    private void Convert()
 350    {
 351        var writer = new StringWriter();
 352        WebUtility.HtmlDecode(HTML, writer);
 353        HTML = writer.ToString();
 54
 355        var converter = new ReverseMarkdown.Converter();
 356        Markdown = converter.Convert(HTML);
 357    }
 58
 59}
+
+
+
+
+

Methods/Properties

+get_HTML()
+get_Markdown()
+Convert()
+
+
+ + \ No newline at end of file diff --git a/coverage/Utility_MemoryConverter.html b/coverage/Utility_MemoryConverter.html new file mode 100644 index 00000000..963e8020 --- /dev/null +++ b/coverage/Utility_MemoryConverter.html @@ -0,0 +1,1257 @@ + + + + + + + +Utility.Components.MemoryConverter.MemoryConverter - Coverage Report + +
+

< Summary

+
+
+
Information
+
+
+ + + + + + + + + + + + + + + + + +
Class:Utility.Components.MemoryConverter.MemoryConverter
Assembly:Utility
File(s):/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Components/MemoryConverter/MemoryConverter.razor
Tag:106_9081424346
+
+
+
+
+
+
+
Line coverage
+
+
68%
+
+ + + + + + + + + + + + + + + + + + + + + +
Covered lines:22
Uncovered lines:10
Coverable lines:32
Total lines:105
Line coverage:68.7%
+
+
+
+
+
Branch coverage
+
+
50%
+
+ + + + + + + + + + + + + +
Covered branches:4
Total branches:8
Branch coverage:50%
+
+
+
+
+
Method coverage
+
+
+

Feature is only available for sponsors

+Upgrade to PRO version +
+
+
+
+

Metrics

+
+ +++++++ + + + + + + + + + + + +
MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Input()100%11100%
get_Output()100%11100%
OnInitialized()100%11100%
Convert()100%11100%
Clear()100%210%
Copy()100%210%
.cctor()100%11100%
SizeSuffix(...)50%9.21873.33%
+
+

File(s)

+

/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Components/MemoryConverter/MemoryConverter.razor

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#LineLine coverage
 1@using System.Text
 2@inject IJSRuntime JSRuntime
 3
 4<div class="container">
 5
 6    <div class="row">
 7        <div class="col">
 8            <h2>Memory Converter</h2>
 9        </div>
 10    </div>
 11
 12    <div class="row">
 13        <div class="col">
 14            <div class="input-group">
 15                <div class="input-group-prepend">
 16                    <span class="input-group-text">Bytes:</span>
 17                </div>
 18                <input type="number" id="input" class="form-control" @bind="Input" placeholder="1030" />
 19                <span class="input-group-btn">
 20                    <button id="btnClear" name="btnBinaryClear" class="btn btn-danger float-right" @onclick="Clear"><i c
 21                </span>
 22            </div>
 23        </div>
 24    </div>
 25
 26    <div class="row">
 27        <div class="col">
 28            <button id="btnConvert" name="btnConvert" class="btn btn-success float-right" @onclick="Convert">Convert</bu
 29        </div>
 30    </div>
 31
 32    <div class="row">
 33        <div class="col">
 34            <div class="input-group">
 35                <input id="output" class="form-control" @bind="Output" placeholder="KB / MB / GB / TB / PB / EB / ZB / Y
 36                <span class="input-group-btn">
 37                    <button id="btnCopy" name="btnCopy" class="btn btn-info float-right" @onclick="Copy"><i class="far f
 38                </span>
 39            </div>
 40
 41        </div>
 42    </div>
 43
 44</div>
 45
 46@code {
 47    [Parameter]
 748    public long Input { get; set; }
 49
 50    [Parameter]
 751    public string? Output { get; set; }
 52
 53    protected override void OnInitialized()
 154    {
 155        Input = 1030;
 156        Output = string.Empty;
 157    }
 58
 59    void Convert()
 160    {
 161        var data = SizeSuffix(Input);
 162        Output = data;
 163    }
 64
 65    private void Clear()
 066    {
 067        Input = 0;
 068    }
 69
 70    async Task Copy()
 071    {
 072        await JSRuntime.InvokeVoidAsync("navigator.clipboard.writeText", Output);
 073    }
 74
 75    #region Convert
 76    // https://stackoverflow.com/a/14488941/2895831
 177    static readonly string[] SizeSuffixes = { "bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB" };
 78
 79    static string SizeSuffix(Int64 value, int decimalPlaces = 1)
 180    {
 181        if (decimalPlaces < 0) { throw new ArgumentOutOfRangeException("decimalPlaces"); }
 182        if (value < 0) { return "-" + SizeSuffix(-value, decimalPlaces); }
 183        if (value == 0) { return string.Format("{0:n" + decimalPlaces + "} bytes", 0); }
 84
 85        // mag is 0 for bytes, 1 for KB, 2, for MB, etc.
 186        int mag = (int)Math.Log(value, 1024);
 87
 88        // 1L << (mag * 10) == 2 ^ (10 * mag)
 89        // [i.e. the number of bytes in the unit corresponding to mag]
 190        decimal adjustedSize = (decimal)value / (1L << (mag * 10));
 91
 92        // make adjustment when the value is large enough that
 93        // it would round up to 1000 or more
 194        if (Math.Round(adjustedSize, decimalPlaces) >= 1000)
 095        {
 096            mag += 1;
 097            adjustedSize /= 1024;
 098        }
 99
 1100        return string.Format("{0:n" + decimalPlaces + "} {1}",
 1101            adjustedSize,
 1102            SizeSuffixes[mag]);
 1103    }
 104    #endregion Convert
 105}
+
+
+
+ +
+ + \ No newline at end of file diff --git a/coverage/Utility_MonacoDiffEditor.html b/coverage/Utility_MonacoDiffEditor.html new file mode 100644 index 00000000..5840a026 --- /dev/null +++ b/coverage/Utility_MonacoDiffEditor.html @@ -0,0 +1,1251 @@ + + + + + + + +Utility.Components.MonacoDiffEditor.MonacoDiffEditor - Coverage Report + +
+

< Summary

+
+
+
Information
+
+
+ + + + + + + + + + + + + + + + + +
Class:Utility.Components.MonacoDiffEditor.MonacoDiffEditor
Assembly:Utility
File(s):/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Components/MonacoDiffEditor/MonacoDiffEditor.razor
Tag:106_9081424346
+
+
+
+
+
+
+
Line coverage
+
+
0%
+
+ + + + + + + + + + + + + + + + + + + + + +
Covered lines:0
Uncovered lines:34
Coverable lines:34
Total lines:95
Line coverage:0%
+
+
+
+
+
Branch coverage
+
+
0%
+
+ + + + + + + + + + + + + +
Covered branches:0
Total branches:4
Branch coverage:0%
+
+
+
+
+
Method coverage
+
+
+

Feature is only available for sponsors

+Upgrade to PRO version +
+
+
+
+

Metrics

+
+ +++++++ + + + + + + + + + + + + + +
MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
BuildRenderTree(...)100%210%
get_Language()100%210%
get_Original()100%210%
get_Modified()100%210%
.ctor()100%210%
DiffEditorConstructionOptions(...)100%210%
OnAfterRenderAsync()100%210%
OnKeyUpOriginal(...)100%210%
OnKeyUpModified(...)100%210%
ChangeTheme()0%2040%
+
+

File(s)

+

/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Components/MonacoDiffEditor/MonacoDiffEditor.razor

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#LineLine coverage
 1<div class="container">
 2
 3    <div class="row">
 4        <div class="col">
 5            <div style="margin:10px 0;">
 6                Theme:
 7                <select id="theme" @onchange="ChangeTheme">
 8                    <option value="vs">Visual Studio</option>
 9                    <option value="vs-dark">Visual Studio Dark</option>
 10                    <option value="hc-black">High Contrast Black</option>
 11                </select>
 12            </div>
 13        </div>
 14    </div>
 15
 16    <div class="row">
 17        <div class="col">
 18            <p>⚠️ <strong>WIP</strong></p>
 19        </div>
 20    </div>
 21
 22    <div class="row">
 23        <div class="col">
 024            <p><strong>Language:</strong> @Language</p>
 25        </div>
 26    </div>
 27
 28    <div class="row">
 29        <div class="col">
 30            <StandaloneDiffEditor
 31                Id="diff-editor"
 32                ConstructionOptions="DiffEditorConstructionOptions"
 33                OnKeyUpOriginal="OnKeyUpOriginal"
 34                OnKeyUpModified="OnKeyUpModified"
 035                @ref="_diffEditor"
 36            />
 37            @* OnDidInit="EditorOnDidInit" *@
 38        </div>
 39    </div>
 40</div>
 41
 42@code {
 43
 044    [Parameter] public string Language { get; set; } = "javascript";
 45
 046    [Parameter] public string Original { get; set; }
 47
 048    [Parameter] public string Modified { get; set; }
 49
 050    private StandaloneDiffEditor _diffEditor = null!;
 51
 52    private StandaloneDiffEditorConstructionOptions DiffEditorConstructionOptions(StandaloneDiffEditor editor)
 053    {
 054        return new StandaloneDiffEditorConstructionOptions
 055        {
 056            OriginalEditable = true
 057        };
 058    }
 59
 60    protected override async Task OnAfterRenderAsync(bool firstRender)
 061    {
 62        try
 063        {
 064            await _diffEditor.SetModel(new DiffEditorModel()
 065            {
 066                Original = await Global.CreateModel(Original, Language),
 067                Modified = await Global.CreateModel(Modified, Language)
 068            });
 069        }
 070        catch (JSException)
 071        {
 072        }
 073    }
 74
 75    // private async Task EditorOnDidInit()
 76    // {
 77    //
 78    // }
 79
 80    private void OnKeyUpOriginal(KeyboardEvent keyboardEvent)
 081    {
 082        Console.WriteLine("OnKeyUpOriginal : " + keyboardEvent.Code);
 083    }
 84
 85    private void OnKeyUpModified(KeyboardEvent keyboardEvent)
 086    {
 087        Console.WriteLine("OnKeyUpModified : " + keyboardEvent.Code);
 088    }
 89
 90    private async Task ChangeTheme(ChangeEventArgs e)
 091    {
 092        Console.WriteLine($"setting theme to: {e.Value?.ToString()}");
 093        await Global.SetTheme(e.Value?.ToString());
 094    }
 95}
+
+
+
+ +
+ + \ No newline at end of file diff --git a/coverage/Utility_MonacoEditor.html b/coverage/Utility_MonacoEditor.html new file mode 100644 index 00000000..4b95b93a --- /dev/null +++ b/coverage/Utility_MonacoEditor.html @@ -0,0 +1,1196 @@ + + + + + + + +Utility.Components.MonacoEditor.MonacoEditor - Coverage Report + +
+

< Summary

+
+
+
Information
+
+
+ + + + + + + + + + + + + + + + + +
Class:Utility.Components.MonacoEditor.MonacoEditor
Assembly:Utility
File(s):/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Components/MonacoEditor/MonacoEditor.razor
Tag:106_9081424346
+
+
+
+
+
+
+
Line coverage
+
+
0%
+
+ + + + + + + + + + + + + + + + + + + + + +
Covered lines:0
Uncovered lines:16
Coverable lines:16
Total lines:54
Line coverage:0%
+
+
+
+
+
Branch coverage
+
+
0%
+
+ + + + + + + + + + + + + +
Covered branches:0
Total branches:4
Branch coverage:0%
+
+
+
+
+
Method coverage
+
+
+

Feature is only available for sponsors

+Upgrade to PRO version +
+
+
+
+

Metrics

+
+ +++++++ + + + + + + +
MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor()100%210%
EditorConstructionOptions(...)100%210%
ChangeTheme()0%2040%
+
+

File(s)

+

/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Components/MonacoEditor/MonacoEditor.razor

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#LineLine coverage
 1<div class="container">
 2
 3    <div class="row">
 4        <div class="col">
 5            <div style="margin:10px 0;">
 6                Theme:
 7                <select id="theme" @onchange="ChangeTheme">
 8                    <option value="vs">Visual Studio</option>
 9                    <option value="vs-dark">Visual Studio Dark</option>
 10                    <option value="hc-black">High Contrast Black</option>
 11                </select>
 12            </div>
 13        </div>
 14    </div>
 15
 16    <div class="row">
 17        <div class="col">
 18            <p><strong>Language:</strong> javascript</p>
 19        </div>
 20    </div>
 21
 22    <div class="row">
 23        <div class="col">
 24            <StandaloneCodeEditor
 25                Id="editor"
 26                ConstructionOptions="EditorConstructionOptions"
 27                CssClass="editor"
 028                @ref="_editor" />
 29        </div>
 30    </div>
 31</div>
 32
 33@code {
 34
 035    private StandaloneCodeEditor _editor = null!;
 36
 37    private StandaloneEditorConstructionOptions EditorConstructionOptions(StandaloneCodeEditor editor)
 038    {
 039        return new StandaloneEditorConstructionOptions
 040        {
 041            AutomaticLayout = true,
 042            Language = "javascript",
 043            Value = "function xyz() {\n" +
 044                    "   console.log(\"Hello world!\");\n" +
 045                    "}"
 046        };
 047    }
 48
 49    private async Task ChangeTheme(ChangeEventArgs e)
 050    {
 051        Console.WriteLine($"setting theme to: {e.Value?.ToString()}");
 052        await Global.SetTheme(e.Value?.ToString());
 053    }
 54}
+
+
+
+ +
+ + \ No newline at end of file diff --git a/coverage/Utility_NavMenu.html b/coverage/Utility_NavMenu.html new file mode 100644 index 00000000..c08035fa --- /dev/null +++ b/coverage/Utility_NavMenu.html @@ -0,0 +1,1171 @@ + + + + + + + +Utility.Shared.NavMenu - Coverage Report + +
+

< Summary

+
+
+
Information
+
+
+ + + + + + + + + + + + + + + + + +
Class:Utility.Shared.NavMenu
Assembly:Utility
File(s):/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Shared/NavMenu.razor
Tag:106_9081424346
+
+
+
+
+
+
+
Line coverage
+
+
0%
+
+ + + + + + + + + + + + + + + + + + + + + +
Covered lines:0
Uncovered lines:1
Coverable lines:1
Total lines:33
Line coverage:0%
+
+
+
+
+
Branch coverage
+
+
N/A
+
+ + + + + + + + + + + + + +
Covered branches:0
Total branches:0
Branch coverage:N/A
+
+
+
+
+
Method coverage
+
+
+

Feature is only available for sponsors

+Upgrade to PRO version +
+
+
+
+

Metrics

+
+ +++++++ + + + + +
MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor()100%210%
+
+

File(s)

+

/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Shared/NavMenu.razor

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#LineLine coverage
 1
 2<div class="navmenu">
 3    <input type="checkbox" title="Menu expand/collapse toggle" id="navmenu-toggle" class="navmenu-icon" />
 4    <label for="navmenu-toggle" class="navmenu-icon"><FluentIcon Value="@(new Icons.Regular.Size20.Navigation())" Color=
 5    <nav class="sitenav" aria-labelledby="main-menu" onclick="document.getElementById('navmenu-toggle').click();">
 6        <FluentNavMenu Id="main-menu" Width="250" Collapsible="true" Title="Navigation menu" @bind-Expanded="expanded">
 7            <FluentNavLink Href="/" Match="NavLinkMatch.All" Icon="@(new Icons.Regular.Size20.Home())" IconColor="Color.
 8            <FluentNavLink Href="urls" Icon="@(new Icons.Regular.Size20.Code())" IconColor="Color.Accent">Urls</FluentNa
 9            <FluentNavLink Href="guid" Icon="@(new Icons.Regular.Size20.Code())" IconColor="Color.Accent">Guid</FluentNa
 10            <FluentNavLink Href="sql" Icon="@(new Icons.Regular.Size20.Database())" IconColor="Color.Accent">SQL</Fluent
 11            <FluentNavLink Href="html" Icon="@(new Icons.Regular.Size20.Globe())" IconColor="Color.Accent">HTML</FluentN
 12            <FluentNavLink Href="markdown" Icon="@(new Icons.Regular.Size20.ArrowDown())" IconColor="Color.Accent">Markd
 13            <FluentNavLink Href="timerstopwatch" Icon="@(new Icons.Regular.Size20.Timer())" IconColor="Color.Accent">Tim
 14            <FluentNavLink Href="ascii" Icon="@(new Icons.Regular.Size20.CodeText())" IconColor="Color.Accent">Ascii</Fl
 15            <FluentNavLink Href="colourconverter" Icon="@(new Icons.Regular.Size20.PaintBrush())" IconColor="Color.Accen
 16            <FluentNavLink Href="binary" Icon="@(new Icons.Regular.Size20.Code())" IconColor="Color.Accent">Binary</Flue
 17            <FluentNavLink Href="stringconverter" Icon="@(new Icons.Regular.Size20.CurrencyDollarEuro())" IconColor="Col
 18            <FluentNavLink Href="epoch" Icon="@(new Icons.Regular.Size20.Timer())" IconColor="Color.Accent">Epoch</Fluen
 19            <FluentNavLink Href="converter" Icon="@(new Icons.Regular.Size20.ConvertRange())" IconColor="Color.Accent">C
 20            <FluentNavLink Href="jwt" Icon="@(new Icons.Regular.Size20.Code())" IconColor="Color.Accent">JWT</FluentNavL
 21            <FluentNavLink Href="luhn" Icon="@(new Icons.Regular.Size20.Code())" IconColor="Color.Accent">Luhn</FluentNa
 22            <FluentNavLink Href="hcf" Icon="@(new Icons.Regular.Size20.Glasses())" IconColor="Color.Accent">Hidden Char 
 23            <FluentNavLink Href="codeeditor" Icon="@(new Icons.Regular.Size20.Code())" IconColor="Color.Accent">Code Edi
 24            <FluentNavLink Href="diffeditor" Icon="@(new Icons.Regular.Size20.Code())" IconColor="Color.Accent">Diff Edi
 25            <FluentNavLink Href="unicode" Icon="@(new Icons.Regular.Size20.Code())" IconColor="Color.Accent">Unicode</Fl
 26            <FluentNavLink Href="cryptography" Icon="@(new Icons.Regular.Size20.LockClosedKey())" IconColor="Color.Accen
 27        </FluentNavMenu>
 28    </nav>
 29</div>
 30
 31@code {
 032    private bool expanded = true;
 33}
+
+
+
+
+

Methods/Properties

+.ctor()
+
+
+ + \ No newline at end of file diff --git a/coverage/Utility_Program.html b/coverage/Utility_Program.html new file mode 100644 index 00000000..f20f4fc8 --- /dev/null +++ b/coverage/Utility_Program.html @@ -0,0 +1,1157 @@ + + + + + + + +Program - Coverage Report + +
+

< Summary

+
+
+
Information
+
+
+ + + + + + + + + + + + + + + + + +
Class:Program
Assembly:Utility
File(s):/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Program.cs
Tag:106_9081424346
+
+
+
+
+
+
+
Line coverage
+
+
0%
+
+ + + + + + + + + + + + + + + + + + + + + +
Covered lines:0
Uncovered lines:8
Coverable lines:8
Total lines:19
Line coverage:0%
+
+
+
+
+
Branch coverage
+
+
N/A
+
+ + + + + + + + + + + + + +
Covered branches:0
Total branches:0
Branch coverage:N/A
+
+
+
+
+
Method coverage
+
+
+

Feature is only available for sponsors

+Upgrade to PRO version +
+
+
+
+

Metrics

+
+ +++++++ + + + + +
MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
<Main>$()100%210%
+
+

File(s)

+

/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Program.cs

+
+ + + + + + + + + + + + + + + + + + + + + + + +
#LineLine coverage
 1using Microsoft.AspNetCore.Components.Web;
 2using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
 3using Microsoft.FluentUI.AspNetCore.Components;
 4
 5using Blazored.LocalStorage;
 6
 7using Utility;
 8using Utility.Infrastructure;
 9
 010var builder = WebAssemblyHostBuilder.CreateDefault(args);
 011builder.RootComponents.Add<App>("#app");
 012builder.RootComponents.Add<HeadOutlet>("head::after");
 13
 014builder.Services.AddFluentUIComponents();
 015builder.Services.AddScoped<CacheStorageAccessor>();
 016builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
 017builder.Services.AddBlazoredLocalStorage();
 18
 019await builder.Build().RunAsync();
+
+
+
+
+

Methods/Properties

+<Main>$()
+
+
+ + \ No newline at end of file diff --git a/coverage/Utility_SQLBuilder.html b/coverage/Utility_SQLBuilder.html new file mode 100644 index 00000000..d376b3c8 --- /dev/null +++ b/coverage/Utility_SQLBuilder.html @@ -0,0 +1,1193 @@ + + + + + + + +Utility.Pages.SQLBuilder - Coverage Report + +
+

< Summary

+
+
+
Information
+
+
+ + + + + + + + + + + + + + + + + +
Class:Utility.Pages.SQLBuilder
Assembly:Utility
File(s):/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Pages/SQLBuilder.razor
Tag:106_9081424346
+
+
+
+
+
+
+
Line coverage
+
+
0%
+
+ + + + + + + + + + + + + + + + + + + + + +
Covered lines:0
Uncovered lines:2
Coverable lines:2
Total lines:55
Line coverage:0%
+
+
+
+
+
Branch coverage
+
+
N/A
+
+ + + + + + + + + + + + + +
Covered branches:0
Total branches:0
Branch coverage:N/A
+
+
+
+
+
Method coverage
+
+
+

Feature is only available for sponsors

+Upgrade to PRO version +
+
+
+
+

Metrics

+
+ +++++++ + + + + +
MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
OnInitializedAsync()100%210%
+
+

File(s)

+

/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Pages/SQLBuilder.razor

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#LineLine coverage
 1@page "/sql"
 2
 3@using Utility.Components.SQLInClause
 4@using Utility.Components.SQLInput
 5@using Utility.Components.SQLContains
 6
 7@inject IJSRuntime JSRuntime
 8
 9<h1>SQL Builder</h1>
 10
 11<div class="container">
 12
 13    <div class="row">
 14        <div class="col">
 15            <div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border
 16                <h2>IN Clause</h2>
 17            </div>
 18
 19            <SQLInClause />
 20        </div>
 21    </div>
 22
 23    <div class="row">
 24        <div class="col">
 25
 26            <div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border
 27                <h2>Input</h2>
 28            </div>
 29
 30            <SQLInput />
 31        </div>
 32    </div>
 33
 34    <div class="row">
 35        <div class="col">
 36
 37            <div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border
 38                <h2>Contains</h2>
 39            </div>
 40
 41            <SQLContains />
 42        </div>
 43    </div>
 44
 45    <br />
 46
 47</div>
 48
 49@code {
 50
 51    protected override async Task OnInitializedAsync()
 052    {
 53
 054    }
 55}
+
+
+
+
+

Methods/Properties

+OnInitializedAsync()
+
+
+ + \ No newline at end of file diff --git a/coverage/Utility_SQLContains.html b/coverage/Utility_SQLContains.html new file mode 100644 index 00000000..d657c144 --- /dev/null +++ b/coverage/Utility_SQLContains.html @@ -0,0 +1,1263 @@ + + + + + + + +Utility.Components.SQLContains.SQLContains - Coverage Report + +
+

< Summary

+
+
+
Information
+
+
+ + + + + + + + + + + + + + + + + +
Class:Utility.Components.SQLContains.SQLContains
Assembly:Utility
File(s):/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Components/SQLContains/SQLContains.razor
Tag:106_9081424346
+
+
+
+
+
+
+
Line coverage
+
+
53%
+
+ + + + + + + + + + + + + + + + + + + + + +
Covered lines:14
Uncovered lines:12
Coverable lines:26
Total lines:105
Line coverage:53.8%
+
+
+
+
+
Branch coverage
+
+
100%
+
+ + + + + + + + + + + + + +
Covered branches:2
Total branches:2
Branch coverage:100%
+
+
+
+
+
Method coverage
+
+
+

Feature is only available for sponsors

+Upgrade to PRO version +
+
+
+
+

Metrics

+
+ +++++++ + + + + + + + + + + + + + + +
MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Field()100%11100%
get_Input()100%11100%
get_Output()100%11100%
get_IncludeWildcard()100%11100%
.ctor()100%11100%
OnInitialized()100%11100%
CopyField()100%210%
ClearField()100%210%
Clear()100%210%
Create()100%22100%
Copy()100%210%
+
+

File(s)

+

/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Components/SQLContains/SQLContains.razor

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#LineLine coverage
 1@inject IJSRuntime JSRuntime
 2
 3<div class="container">
 4    <label class="label-control">Field:</label>
 5    <div class="input-group">
 6        <input type="text" id="field" name="field" class="form-control" @bind="Field">
 7        <span class="input-group-btn">
 8            <button class="btn btn-info" type="button" id="btnFieldCopy" name="btnFieldCopy" @onclick="CopyField"><i cla
 9            <button class="btn btn-danger" type="button" id="btnFieldClear" name="btnFieldClear" @onclick="ClearField"><
 10        </span>
 11    </div>
 12    <div class="row">
 13        <div class="col">
 14            <div class="input-group">
 15                <textarea id="sqlBuilderInput" name="sqlBuilderInput" class="form-control" rows="5" @bind="Input"></text
 16                <span class="input-group-btn">
 17                    <button id="btnClearSQLBuilder" name="btnClearSQLBuilder" class="btn btn-danger" @onclick="Clear"><i
 18                </span>
 19            </div>
 20        </div>
 21    </div>
 22    <div class="row">
 23        <div class="col">
 24            <div class="form-check">
 25                <input class="form-check-input" type="checkbox" id="chkIncludeWildcard" @bind-value="IncludeWildcard" ch
 26                <label class="form-check-label" for="chkIncludeWildcard">
 27                    Include Wildcard
 28                </label>
 29            </div>
 30        </div>
 31    </div>
 32    <div class="row">
 33        <div class="col">
 34            <button class="btn btn-success" type="button" id="btnParse" name="btnParse" @onclick="Create">Create</button
 35        </div>
 36    </div>
 37    <div class="row">
 38        <div class="col">
 39            <div class="input-group">
 40                <textarea id="sqlBuilderOutput" name="sqlBuilderOutput" class="form-control" rows="5" @bind="Output"></t
 41                <span class="input-group-btn">
 42                    <button id="btnCopySQLBuilder" name="btnCopySQLBuilder" class="btn btn-info" @onclick="Copy"><i clas
 43                </span>
 44            </div>
 45
 46        </div>
 47    </div>
 48</div>
 49
 50@code {
 51
 52    [Parameter]
 2053    public string? Field { get; set; }
 54
 55    [Parameter]
 1656    public string? Input { get; set; }
 57
 58    [Parameter]
 1659    public string? Output { get; set; }
 60
 61    [Parameter]
 2062    public bool IncludeWildcard { get; set; }
 63
 264    string wildcard = "*";
 65
 66    protected override void OnInitialized()
 267    {
 68        // Field = string.Empty;
 69        // Input = string.Empty;
 70        // Output = string.Empty;
 271        IncludeWildcard = false;
 272    }
 73
 74    async Task CopyField()
 075    {
 076        await JSRuntime.InvokeVoidAsync("navigator.clipboard.writeText", Field);
 077    }
 78
 79    private void ClearField()
 080    {
 081        Field = string.Empty;
 082    }
 83
 84    private void Clear()
 085    {
 086        Input = string.Empty;
 087    }
 88
 89    private void Create()
 290    {
 91        // CONTAINS(Description, @SearchWord)
 92        // WHERE CONTAINS(t.something, '"bla*" OR "foo*" OR "batz*"')
 93
 294        wildcard = IncludeWildcard ? "*" : "";
 295        var items = Input.Split(new[] { System.Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);
 896        var likeItems = string.Join(" OR ", items.Select(i => $"CONTAINS ({Field}, {wildcard}{i.Trim()}{wildcard})"));
 97
 298        Output = likeItems;
 299    }
 100
 101    async Task Copy()
 0102    {
 0103        await JSRuntime.InvokeVoidAsync("navigator.clipboard.writeText", Output);
 0104    }
 105}
+
+
+
+ +
+ + \ No newline at end of file diff --git a/coverage/Utility_SQLInClause.html b/coverage/Utility_SQLInClause.html new file mode 100644 index 00000000..7674a42b --- /dev/null +++ b/coverage/Utility_SQLInClause.html @@ -0,0 +1,1226 @@ + + + + + + + +Utility.Components.SQLInClause.SQLInClause - Coverage Report + +
+

< Summary

+
+
+
Information
+
+
+ + + + + + + + + + + + + + + + + +
Class:Utility.Components.SQLInClause.SQLInClause
Assembly:Utility
File(s):/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Components/SQLInClause/SQLInClause.razor
Tag:106_9081424346
+
+
+
+
+
+
+
Line coverage
+
+
0%
+
+ + + + + + + + + + + + + + + + + + + + + +
Covered lines:0
Uncovered lines:22
Coverable lines:22
Total lines:82
Line coverage:0%
+
+
+
+
+
Branch coverage
+
+
0%
+
+ + + + + + + + + + + + + +
Covered branches:0
Total branches:6
Branch coverage:0%
+
+
+
+
+
Method coverage
+
+
+

Feature is only available for sponsors

+Upgrade to PRO version +
+
+
+
+

Metrics

+
+ +++++++ + + + + + + + +
MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor()100%210%
Clear()100%210%
Parse()0%4260%
Copy()100%210%
+
+

File(s)

+

/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Components/SQLInClause/SQLInClause.razor

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#LineLine coverage
 1@inject IJSRuntime JSRuntime
 2
 3<div class="container">
 4    <div class="row">
 5        <div class="col">
 6            <div class="input-group">
 7                <textarea id="sqlBuilderInput" name="sqlBuilderInput" class="form-control" rows="5" @bind="Input"></text
 8                <span class="input-group-btn">
 9                    <button id="btnClearSQLBuilder" name="btnClearSQLBuilder" class="btn btn-danger float-right" @onclic
 10                </span>
 11            </div>
 12        </div>
 13    </div>
 14    <div class="row">
 15        <div class="col">
 16            <label class="label-control">Wrapper:</label>
 17            <div class="input-group">
 18                <select id="wrapper" name="wrapper" class="form-control" @bind="Wrapper">
 19                    <option value=""></option>
 20                    <option value="'">'</option>
 21                </select>
 22                <span class="input-group-btn">
 23                    <button class="btn btn-success" type="button" id="btnParse" name="btnParse" @onclick="Parse">Parse</
 24                </span>
 25            </div>
 26        </div>
 27    </div>
 28    <div class="row">
 29        <div class="col">
 30            <div class="form-check">
 31                <input class="form-check-input" type="checkbox" id="chkRemoveDuplicates" @bind-value="RemoveDuplicates" 
 32                <label class="form-check-label" for="chkRemoveDuplicates">
 33                    Remove Duplicates
 34                </label>
 35            </div>
 36        </div>
 37    </div>
 38    <div class="row">
 39        <div class="col">
 40            <div class="input-group">
 41                <textarea id="sqlBuilderOutput" name="sqlBuilderOutput" class="form-control" rows="5" @bind="Output"></t
 42                <span class="input-group-btn">
 43                    <button id="btnCopySQLBuilder" name="btnCopySQLBuilder" class="btn btn-info float-right" @onclick="C
 44                </span>
 45            </div>
 46
 47        </div>
 48    </div>
 49</div>
 50
 51@code {
 052    string Input = string.Empty;
 053    string Output = string.Empty;
 054    bool RemoveDuplicates = false;
 055    string Wrapper = "";
 56
 57    private void Clear()
 058    {
 059        Input = string.Empty;
 060    }
 61
 62
 63    private void Parse()
 064    {
 065        if (Input.Length == 0) return;
 66
 067        Output = string.Empty;
 068        var items = Input.Split().Where(x => x != string.Empty);
 069        if (RemoveDuplicates) items = items.Distinct();
 070        foreach (var item in items)
 071        {
 072            Output += $"{Wrapper}{item}{Wrapper},";
 073        }
 074        Output = Output.Remove(Output.Length - 1, 1);
 075        Output = "IN (" + Output + ")";
 076    }
 77
 78    async Task Copy()
 079    {
 080        await JSRuntime.InvokeVoidAsync("navigator.clipboard.writeText", Output);
 081    }
 82}
+
+
+
+
+

Methods/Properties

+.ctor()
+Clear()
+Parse()
+Copy()
+
+
+ + \ No newline at end of file diff --git a/coverage/Utility_SQLInput.html b/coverage/Utility_SQLInput.html new file mode 100644 index 00000000..3ba7e736 --- /dev/null +++ b/coverage/Utility_SQLInput.html @@ -0,0 +1,1223 @@ + + + + + + + +Utility.Components.SQLInput.SQLInput - Coverage Report + +
+

< Summary

+
+
+
Information
+
+
+ + + + + + + + + + + + + + + + + +
Class:Utility.Components.SQLInput.SQLInput
Assembly:Utility
File(s):/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Components/SQLInput/SQLInput.razor
Tag:106_9081424346
+
+
+
+
+
+
+
Line coverage
+
+
0%
+
+ + + + + + + + + + + + + + + + + + + + + +
Covered lines:0
Uncovered lines:21
Coverable lines:21
Total lines:75
Line coverage:0%
+
+
+
+
+
Branch coverage
+
+
N/A
+
+ + + + + + + + + + + + + +
Covered branches:0
Total branches:0
Branch coverage:N/A
+
+
+
+
+
Method coverage
+
+
+

Feature is only available for sponsors

+Upgrade to PRO version +
+
+
+
+

Metrics

+
+ +++++++ + + + + + + + + + +
MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor()100%210%
CopyField()100%210%
ClearField()100%210%
Clear()100%210%
Parse()100%210%
Copy()100%210%
+
+

File(s)

+

/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Components/SQLInput/SQLInput.razor

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#LineLine coverage
 1@inject IJSRuntime JSRuntime
 2
 3<div class="container">
 4    <label class="label-control">Field:</label>
 5    <div class="input-group">
 6        <input type="text" id="field" name="field" class="form-control" @bind="Field">@*placeholder="i.[Guid]"*@
 7        <span class="input-group-btn">
 8            <button class="btn btn-info" type="button" id="btnFieldCopy" name="btnFieldCopy" @onclick="CopyField"><i cla
 9            <button class="btn btn-danger" type="button" id="btnFieldClear" name="btnFieldClear" @onclick="ClearField"><
 10        </span>
 11    </div>
 12    <div class="row">
 13        <div class="col">
 14            <div class="input-group">
 15                <textarea id="sqlBuilderInput" name="sqlBuilderInput" class="form-control" rows="5" @bind="Input"></text
 16                <span class="input-group-btn">
 17                    <button id="btnClearSQLBuilder" name="btnClearSQLBuilder" class="btn btn-danger" @onclick="Clear"><i
 18                </span>
 19            </div>
 20
 21        </div>
 22    </div>
 23    <div class="row">
 24        <div class="col">
 25            <button class="btn btn-success" type="button" id="btnParse" name="btnParse" @onclick="Parse">Parse</button>
 26        </div>
 27    </div>
 28    <div class="row">
 29        <div class="col">
 30            <div class="input-group">
 31                <textarea id="sqlBuilderOutput" name="sqlBuilderOutput" class="form-control" rows="5" @bind="Output"></t
 32                <span class="input-group-btn">
 33                    <button id="btnCopySQLBuilder" name="btnCopySQLBuilder" class="btn btn-info" @onclick="Copy"><i clas
 34                </span>
 35            </div>
 36
 37        </div>
 38    </div>
 39</div>
 40
 41@code {
 42
 043    string Field = string.Empty;
 044    string Input = string.Empty;
 045    string Output = string.Empty;
 046    string wildcard = "%";
 47
 48    async Task CopyField()
 049    {
 050        await JSRuntime.InvokeVoidAsync("navigator.clipboard.writeText", Field);
 051    }
 52
 53    private void ClearField()
 054    {
 055        Field = string.Empty;
 056    }
 57
 58    private void Clear()
 059    {
 060        Input = string.Empty;
 061    }
 62
 63    private void Parse()
 064    {
 065        var items = Input.Split(new[] { System.Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);
 066        var likeItems = string.Join(" OR ", items.Select(i => $"{Field} LIKE {wildcard}{i.Trim()}{wildcard}"));
 67
 068        Output = likeItems;
 069    }
 70
 71    async Task Copy()
 072    {
 073        await JSRuntime.InvokeVoidAsync("navigator.clipboard.writeText", Output);
 074    }
 75}
+
+
+
+
+

Methods/Properties

+.ctor()
+CopyField()
+ClearField()
+Clear()
+Parse()
+Copy()
+
+
+ + \ No newline at end of file diff --git a/coverage/Utility_SiteSettings.html b/coverage/Utility_SiteSettings.html new file mode 100644 index 00000000..209ff2d2 --- /dev/null +++ b/coverage/Utility_SiteSettings.html @@ -0,0 +1,1161 @@ + + + + + + + +Utility.Components.SiteSettings - Coverage Report + +
+

< Summary

+
+
+
Information
+
+
+ + + + + + + + + + + + + + + + + +
Class:Utility.Components.SiteSettings
Assembly:Utility
File(s):/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Components/SiteSettings.razor.cs
Tag:106_9081424346
+
+
+
+
+
+
+
Line coverage
+
+
0%
+
+ + + + + + + + + + + + + + + + + + + + + +
Covered lines:0
Uncovered lines:12
Coverable lines:12
Total lines:23
Line coverage:0%
+
+
+
+
+
Branch coverage
+
+
N/A
+
+ + + + + + + + + + + + + +
Covered branches:0
Total branches:0
Branch coverage:N/A
+
+
+
+
+
Method coverage
+
+
+

Feature is only available for sponsors

+Upgrade to PRO version +
+
+
+
+

Metrics

+
+ +++++++ + + + + +
MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
OpenSiteSettingsAsync()100%210%
+
+

File(s)

+

/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Components/SiteSettings.razor.cs

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
#LineLine coverage
 1using Microsoft.FluentUI.AspNetCore.Components;
 2
 3namespace Utility.Components;
 4
 5public partial class SiteSettings
 6{
 7    private IDialogReference? _dialog;
 8
 9    private async Task OpenSiteSettingsAsync()
 010    {
 011        _dialog = await DialogService.ShowPanelAsync<SiteSettingsPanel>(new DialogParameters()
 012        {
 013            ShowTitle = true,
 014            Title = "Site settings",
 015            Alignment = HorizontalAlignment.Right,
 016            PrimaryAction = "OK",
 017            SecondaryAction = null,
 018            ShowDismiss = true
 019        });
 20
 021        DialogResult result = await _dialog.Result;
 022    }
 23}
+
+
+
+
+

Methods/Properties

+OpenSiteSettingsAsync()
+
+
+ + \ No newline at end of file diff --git a/coverage/Utility_SiteSettingsPanel.html b/coverage/Utility_SiteSettingsPanel.html new file mode 100644 index 00000000..3d72962c --- /dev/null +++ b/coverage/Utility_SiteSettingsPanel.html @@ -0,0 +1,1256 @@ + + + + + + + +Utility.Components.SiteSettingsPanel - Coverage Report + +
+

< Summary

+
+
+
Information
+ +
+
+
+
+
Line coverage
+
+
0%
+
+ + + + + + + + + + + + + + + + + + + + + +
Covered lines:0
Uncovered lines:23
Coverable lines:23
Total lines:92
Line coverage:0%
+
+
+
+
+
Branch coverage
+
+
0%
+
+ + + + + + + + + + + + + +
Covered branches:0
Total branches:4
Branch coverage:0%
+
+
+
+
+
Method coverage
+
+
+

Feature is only available for sponsors

+Upgrade to PRO version +
+
+
+
+

Metrics

+
+ +++++++ + + + + + + + + + + + + + +
MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
File 1: ResetSavedTab()100%210%
File 2: get_Logger()100%210%
File 2: get_CacheStorageAccessor()100%210%
File 2: get_GlobalState()100%210%
File 2: get_Mode()100%210%
File 2: get_OfficeColor()100%210%
File 2: get_Direction()100%210%
File 2: get_AllModes()100%210%
File 2: get_AllOfficeColors()100%210%
File 2: GetCustomColor(...)0%2040%
+
+

File(s)

+

/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Components/SiteSettingsPanel.razor

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#LineLine coverage
 1@implements IDialogContentComponent
 2@inject Blazored.LocalStorage.ILocalStorageService localStorage
 3
 4<div>
 05    <FluentDesignTheme @ref=_theme
 6                       @bind-Mode="@Mode"
 7                       @bind-OfficeColor="@OfficeColor"
 8                       Direction="@Direction"
 9                       StorageName="theme" />
 10
 11    <FluentStack Orientation="Orientation.Vertical" VerticalGap="0">
 12        <FluentSelect Label="Theme"
 13                      Width="100%"
 14                      Style="margin-bottom: 30px;"
 15                      Items="@AllModes"
 16                      @bind-SelectedOption="@Mode" />
 17
 18        <FluentSelect Label="Colour"
 19                      Style="margin-bottom: 30px;"
 20                      Width="100%"
 21                      Items="@(OfficeColorUtilities.AllColors.Cast<OfficeColor?>())"
 22                      Height="200px"
 23                      @bind-SelectedOption="@OfficeColor">
 24            <OptionTemplate>
 25                <FluentStack>
 26                    <FluentIcon Value="@(new Icons.Filled.Size20.RectangleLandscape())"
 27                                Color="Color.Custom"
 28                                CustomColor="@GetCustomColor(@context)" />
 029                    <FluentLabel>@context</FluentLabel>
 30                </FluentStack>
 31            </OptionTemplate>
 32        </FluentSelect>
 33
 34        <FluentLabel>Reset</FluentLabel>
 35        <FluentButton OnClick="ResetSavedTab" Title="Reset">Reset</FluentButton>
 36    </FluentStack>
 37</div>
 38
 39@code {
 40    async void ResetSavedTab()
 041    {
 042        await localStorage.RemoveItemAsync(Constants.LOCAL_STORAGE_TAB);
 043    }
 44}
+
+

/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Components/SiteSettingsPanel.razor.cs

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#LineLine coverage
 1using Microsoft.AspNetCore.Components;
 2using Microsoft.Extensions.Logging;
 3using Microsoft.FluentUI.AspNetCore.Components;
 4using Microsoft.FluentUI.AspNetCore.Components.Extensions;
 5using Utility.Infrastructure;
 6
 7namespace Utility.Components;
 8
 9public partial class SiteSettingsPanel
 10{
 11    private FluentDesignTheme? _theme;
 12
 13    [Inject]
 014    public required ILogger<SiteSettingsPanel> Logger { get; set; }
 15
 16    [Inject]
 017    public required CacheStorageAccessor CacheStorageAccessor { get; set; }
 18
 19    [Inject]
 020    public required GlobalState GlobalState { get; set; }
 21
 022    public DesignThemeModes Mode { get; set; }
 23
 024    public OfficeColor? OfficeColor { get; set; }
 25
 026    public LocalizationDirection? Direction { get; set; }
 27
 028    private static IEnumerable<DesignThemeModes> AllModes => Enum.GetValues<DesignThemeModes>();
 29
 30    private static IEnumerable<OfficeColor?> AllOfficeColors
 31    {
 32        get
 033        {
 034            return Enum.GetValues<OfficeColor>().Select(i => (OfficeColor?)i);
 035        }
 36    }
 37
 38    private static string? GetCustomColor(OfficeColor? color)
 039    {
 040        return color switch
 041        {
 042            null => OfficeColorUtilities.GetRandom(true).ToAttributeValue(),
 043            Microsoft.FluentUI.AspNetCore.Components.OfficeColor.Default => "#036ac4",
 044            _ => color.ToAttributeValue(),
 045        };
 46
 047    }
 48}
+
+
+
+ +
+ + \ No newline at end of file diff --git a/coverage/Utility_Stopwatch.html b/coverage/Utility_Stopwatch.html new file mode 100644 index 00000000..51ca1663 --- /dev/null +++ b/coverage/Utility_Stopwatch.html @@ -0,0 +1,1265 @@ + + + + + + + +Utility.Components.Stopwatch.Stopwatch - Coverage Report + +
+

< Summary

+
+
+
Information
+
+
+ + + + + + + + + + + + + + + + + +
Class:Utility.Components.Stopwatch.Stopwatch
Assembly:Utility
File(s):/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Components/Stopwatch/Stopwatch.razor
Tag:106_9081424346
+
+
+
+
+
+
+
Line coverage
+
+
0%
+
+ + + + + + + + + + + + + + + + + + + + + +
Covered lines:0
Uncovered lines:43
Coverable lines:43
Total lines:109
Line coverage:0%
+
+
+
+
+
Branch coverage
+
+
0%
+
+ + + + + + + + + + + + + +
Covered branches:0
Total branches:6
Branch coverage:0%
+
+
+
+
+
Method coverage
+
+
+

Feature is only available for sponsors

+Upgrade to PRO version +
+
+
+
+

Metrics

+
+ +++++++ + + + + + + + + + + + + + +
MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Input()100%210%
get_TimerOut()100%210%
.ctor()100%210%
StartStop()0%620%
Reset()100%210%
Start(...)0%620%
Stop()100%210%
OnInitialized()100%210%
OnTimedEvent()0%620%
Dispose()100%210%
+
+

File(s)

+

/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Components/Stopwatch/Stopwatch.razor

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#LineLine coverage
 1@using System.Timers
 2@implements IDisposable
 3
 4<div class="container">
 5    <div class="row">
 6        <div class="col">
 7            <h2><i class="fas fa-stopwatch"></i> Stopwatch</h2>
 8        </div>
 9    </div>
 10
 11    <div class="row">
 12        <div class="col">
 13            <input id="input" name="input" class="form-control" @bind="Input" placeholder="00:00" />
 14        </div>
 15    </div>
 16
 17    <div class="row">
 18        <div class="col">
 19            <button id="btnStartStop" name="btnStartStop" class="btn btn-success" @onclick="StartStop"><i class="fas fa-
 20            <button id="btnReset" name="btnReset" class="btn btn-info float-right" @onclick="Reset"><i class="fas fa-syn
 21        </div>
 22    </div>
 23
 24    @* <div class="row"> *@
 25    @*     <div class="col"> *@
 26    @*         <p>Inspired from <a href="" target="_blank"></a></p> *@
 27    @*     </div> *@
 28    @* </div> *@
 29
 30</div>
 31
 32@code {
 33    [Parameter]
 034    public string? Input { get; set; }
 35
 36    [Parameter]
 037    public EventCallback TimerOut { get; set; }
 38
 039    private Timer timer = null!;
 040    private int secondsToRun = 0;
 41
 42    // protected override void OnInitialized()
 43    // {
 44    //     // Input = "00:00";
 45    //     timer = new System.Threading.Timer(async _ =>  // async void
 46    //     {
 47    //         Input =
 48    //         // we need StateHasChanged() because this is an async void handler
 49    //         // we need to Invoke it because we could be on the wrong Thread
 50    //         await InvokeAsync(StateHasChanged);
 51    //     }, null, 0, 1000);
 52    // }
 53
 54    void StartStop()
 055    {
 056        if (string.IsNullOrEmpty(Input)) return;
 057        Start(10);
 058    }
 59
 60    void Reset()
 061    {
 062        Start(600);
 063    }
 64
 65    public void Start(int secondsToRun)
 066    {
 067        if (secondsToRun > 0)
 068        {
 069            Input = TimeSpan.FromSeconds(secondsToRun).ToString(@"mm\:ss");
 070            StateHasChanged();
 071            timer.Start();
 072        }
 073    }
 74
 75    public void Stop()
 076    {
 077        timer.Stop();
 078    }
 79
 80    protected override void OnInitialized()
 081    {
 082        timer = new Timer(1000);
 083        timer.Elapsed += OnTimedEvent;
 084        timer.AutoReset = true;
 085    }
 86
 87    private async void OnTimedEvent(object? sender, ElapsedEventArgs e)
 088    {
 089        secondsToRun--;
 90
 091        await InvokeAsync(() =>
 092        {
 093            Input = TimeSpan.FromSeconds(secondsToRun).ToString(@"mm\:ss");
 094            StateHasChanged();
 095        });
 96
 097        if (secondsToRun <= 0)
 098        {
 099            timer.Stop();
 0100            await TimerOut.InvokeAsync();
 0101        }
 0102    }
 103
 104    public void Dispose()
 0105    {
 0106        timer.Dispose();
 0107    }
 108
 109}
+
+
+
+ +
+ + \ No newline at end of file diff --git a/coverage/Utility_StringConverter.html b/coverage/Utility_StringConverter.html new file mode 100644 index 00000000..71e3ce58 --- /dev/null +++ b/coverage/Utility_StringConverter.html @@ -0,0 +1,1259 @@ + + + + + + + +Utility.Components.StringConverter.StringConverter - Coverage Report + +
+

< Summary

+
+
+
Information
+
+
+ + + + + + + + + + + + + + + + + +
Class:Utility.Components.StringConverter.StringConverter
Assembly:Utility
File(s):/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Components/StringConverter/StringConverter.razor
Tag:106_9081424346
+
+
+
+
+
+
+
Line coverage
+
+
0%
+
+ + + + + + + + + + + + + + + + + + + + + +
Covered lines:0
Uncovered lines:39
Coverable lines:39
Total lines:111
Line coverage:0%
+
+
+
+
+
Branch coverage
+
+
0%
+
+ + + + + + + + + + + + + +
Covered branches:0
Total branches:40
Branch coverage:0%
+
+
+
+
+
Method coverage
+
+
+

Feature is only available for sponsors

+Upgrade to PRO version +
+
+
+
+

Metrics

+
+ +++++++ + + + + + + + + + +
MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
BuildRenderTree(...)100%210%
.ctor()100%210%
Convert()0%1482380%
Clear()100%210%
Copy()100%210%
get_Name()100%210%
+
+

File(s)

+

/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Components/StringConverter/StringConverter.razor

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#LineLine coverage
 1@using System.Text
 2@using Utility.Common;
 3@using System.Globalization
 4
 5@inject IJSRuntime JSRuntime
 6
 7<div class="container">
 8    <div class="row">
 9        <div class="col">
 10            <h2>String Converter</h2>
 11        </div>
 12    </div>
 13
 14    <div class="row">
 15        <div class="col">
 016            <h4>Selected - @choice.Name</h4>
 17            <EditForm Model="choice">
 18                <InputRadioGroup @bind-Value="choice.Name">
 019                    @foreach (var option in Options)
 020                    {
 021                        <InputRadio Value="option" /> @option <br />
 022                    }
 23                </InputRadioGroup>
 24            </EditForm>
 25        </div>
 26    </div>
 27
 28    <div class="row">
 29        <div class="col">
 30            <div class="input-group">
 031                <textarea id="stringconverter" class="form-control" rows="5">@Input</textarea>
 32                <span class="input-group-btn">
 33                    <button id="btnStringConverter" name="btnStringConverter" class="btn btn-success float-right" @oncli
 34                    <button id="btnClearStringConverter" name="btnClearStringConverter" class="btn btn-danger float-righ
 35                </span>
 36            </div>
 37
 38        </div>
 39    </div>
 40
 41    <div class="row">
 42        <div class="col">
 43            <div class="input-group">
 44                <textarea id="outputStringConverter" class="form-control" rows="5" @bind="Output"></textarea>
 45                <span class="input-group-btn">
 46                    <button id="btnCopyStringConverter" name="btnCopyStringConverter" class="btn btn-info float-right" @
 47                </span>
 48            </div>
 49        </div>
 50    </div>
 51
 52</div>
 53
 54@code {
 055    string Input = "the quick brown fox jumps over the lazy dog"; //string.Empty;
 056    string Output = string.Empty;
 57
 058    Choice choice = new Choice()
 059    {
 060        Name = "Sentence case"
 061    };
 062    List<string> Options = new List<string> { "Sentence case", "lower case", "UPPER CASE", "Capitalized Case", "aLtErNaT
 63
 64    private void Convert()
 065    {
 066        TextInfo ti = CultureInfo.CurrentCulture.TextInfo;
 67
 068        switch (choice.Name)
 69        {
 70            case "Sentence case":
 071                Output = Input.FirstCharToUpper();
 072                break;
 73            case "lower case":
 074                Output = Input.ToLower();
 075                break;
 76            case "UPPER CASE":
 077                Output = Input.ToUpper();
 078                break;
 79            case "Capitalized Case":
 080                Output = ti.ToTitleCase(Input);
 081                break;
 82            case "aLtErNaTiNg cAsE":
 083                break;
 84            case "Title Case":
 085                Output = ti.ToTitleCase(Input);
 086                break;
 87            case "InVeRsE CaSe":
 088                Output = Input.Invert();
 089                break;
 90            case "Remove Whitespace":
 091                Output = String.Concat(Input.Where(c => !Char.IsWhiteSpace(c)));
 092                break;
 93        }
 094    }
 95
 96    private void Clear()
 097    {
 098        Input = string.Empty;
 099    }
 100
 101    async Task Copy()
 0102    {
 0103        await JSRuntime.InvokeVoidAsync("navigator.clipboard.writeText", Output);
 0104    }
 105
 106    public class Choice
 107    {
 0108        public string Name { get; set; }
 109    }
 110
 111}
+
+
+
+ +
+ + \ No newline at end of file diff --git a/coverage/Utility_TimeConverter.html b/coverage/Utility_TimeConverter.html new file mode 100644 index 00000000..90736264 --- /dev/null +++ b/coverage/Utility_TimeConverter.html @@ -0,0 +1,1222 @@ + + + + + + + +Utility.Components.TimeConverter.TimeConverter - Coverage Report + +
+

< Summary

+
+
+
Information
+
+
+ + + + + + + + + + + + + + + + + +
Class:Utility.Components.TimeConverter.TimeConverter
Assembly:Utility
File(s):/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Components/TimeConverter/TimeConverter.razor
Tag:106_9081424346
+
+
+
+
+
+
+
Line coverage
+
+
0%
+
+ + + + + + + + + + + + + + + + + + + + + +
Covered lines:0
Uncovered lines:16
Coverable lines:16
Total lines:76
Line coverage:0%
+
+
+
+
+
Branch coverage
+
+
N/A
+
+ + + + + + + + + + + + + +
Covered branches:0
Total branches:0
Branch coverage:N/A
+
+
+
+
+
Method coverage
+
+
+

Feature is only available for sponsors

+Upgrade to PRO version +
+
+
+
+

Metrics

+
+ +++++++ + + + + + + + + +
MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor()100%210%
Convert()100%210%
Clear()100%210%
Copy()100%210%
ConvertTime(...)100%210%
+
+

File(s)

+

/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Components/TimeConverter/TimeConverter.razor

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#LineLine coverage
 1@using System.Text
 2@inject IJSRuntime JSRuntime
 3
 4<div class="container">
 5
 6    <div class="row">
 7        <div class="col">
 8            <h2>⏱️ Time Converter</h2>
 9        </div>
 10    </div>
 11
 12    <div class="row">
 13        <div class="col">
 14            <div class="input-group">
 15                <div class="input-group-prepend">
 16                    <span class="input-group-text">Seconds:</span>
 17                </div>
 18                <input type="number" id="input" class="form-control" @bind="Input" placeholder="60" />
 19                <span class="input-group-btn">
 20                    <button id="btnClear" name="btnBinaryClear" class="btn btn-danger float-right" @onclick="Clear"><i c
 21                </span>
 22            </div>
 23        </div>
 24    </div>
 25
 26    <div class="row">
 27        <div class="col">
 28            <button id="btnConvert" name="btnConvert" class="btn btn-success float-right" @onclick="Convert">Convert</bu
 29        </div>
 30    </div>
 31
 32    <div class="row">
 33        <div class="col">
 34            <div class="input-group">
 35                <div class="input-group-prepend">
 36                    <span class="input-group-text">hh:mm:ss:fff</span>
 37                </div>
 38                <input id="output" class="form-control" @bind="Output" placeholder="hh:mm:ss:fff" readonly="readonly" />
 39                <span class="input-group-btn">
 40                    <button id="btnCopy" name="btnCopy" class="btn btn-info float-right" @onclick="Copy"><i class="far f
 41                </span>
 42            </div>
 43
 44        </div>
 45    </div>
 46
 47</div>
 48
 49@code {
 050    long Input = 60;
 051    string Output = string.Empty;
 52
 53    void Convert()
 054    {
 055        var data = ConvertTime(Input);
 056        Output = data;
 057    }
 58
 59    private void Clear()
 060    {
 061        Input = 0;
 062    }
 63
 64    async Task Copy()
 065    {
 066        await JSRuntime.InvokeVoidAsync("navigator.clipboard.writeText", Output);
 067    }
 68
 69    #region Convert
 70    static string ConvertTime(long seconds)
 071    {
 072        TimeSpan time = TimeSpan.FromSeconds(seconds);
 073        return time.ToString(@"hh\:mm\:ss\:fff");
 074    }
 75    #endregion Convert
 76}
+
+
+
+ +
+ + \ No newline at end of file diff --git a/coverage/Utility_TimerControl.html b/coverage/Utility_TimerControl.html new file mode 100644 index 00000000..ff617b41 --- /dev/null +++ b/coverage/Utility_TimerControl.html @@ -0,0 +1,1265 @@ + + + + + + + +Utility.Components.TimerControl.TimerControl - Coverage Report + +
+

< Summary

+
+
+
Information
+
+
+ + + + + + + + + + + + + + + + + +
Class:Utility.Components.TimerControl.TimerControl
Assembly:Utility
File(s):/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Components/TimerControl/TimerControl.razor
Tag:106_9081424346
+
+
+
+
+
+
+
Line coverage
+
+
0%
+
+ + + + + + + + + + + + + + + + + + + + + +
Covered lines:0
Uncovered lines:41
Coverable lines:41
Total lines:109
Line coverage:0%
+
+
+
+
+
Branch coverage
+
+
0%
+
+ + + + + + + + + + + + + +
Covered branches:0
Total branches:6
Branch coverage:0%
+
+
+
+
+
Method coverage
+
+
+

Feature is only available for sponsors

+Upgrade to PRO version +
+
+
+
+

Metrics

+
+ +++++++ + + + + + + + + + + + + + +
MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Input()100%210%
get_TimerOut()100%210%
.ctor()100%210%
StartStop()0%620%
Reset()100%210%
Start(...)0%620%
Stop()100%210%
OnInitialized()100%210%
OnTimedEvent()0%620%
Dispose()100%210%
+
+

File(s)

+

/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Components/TimerControl/TimerControl.razor

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#LineLine coverage
 1@using System.Timers
 2@implements IDisposable
 3
 4<div class="container">
 5    <div class="row">
 6        <div class="col">
 7            <h2><i class="far fa-hourglass"></i> Timer</h2>
 8        </div>
 9    </div>
 10
 11    <div class="row">
 12        <div class="col">
 13            <input id="input" name="input" class="form-control" @bind="Input" placeholder="00:00" />
 14        </div>
 15    </div>
 16
 17    <div class="row">
 18        <div class="col">
 19            <button id="btnStartStop" name="btnStartStop" class="btn btn-success" @onclick="StartStop"><i class="fas fa-
 20            <button id="btnReset" name="btnReset" class="btn btn-info float-right" @onclick="Reset"><i class="fas fa-syn
 21        </div>
 22    </div>
 23
 24    @* <div class="row"> *@
 25    @*     <div class="col"> *@
 26    @*         <p>Inspired from <a href="" target="_blank"></a></p> *@
 27    @*     </div> *@
 28    @* </div> *@
 29
 30</div>
 31
 32@code {
 33    [Parameter]
 034    public string? Input { get; set; }
 35
 36    [Parameter]
 037    public EventCallback TimerOut { get; set; }
 38
 039    private Timer timer = null!;
 040    private int secondsToRun = 0;
 41
 42    // protected override void OnInitialized()
 43    // {
 44    //     // Input = "00:00";
 45    //     timer = new System.Threading.Timer(async _ =>  // async void
 46    //     {
 47    //         Input =
 48    //         // we need StateHasChanged() because this is an async void handler
 49    //         // we need to Invoke it because we could be on the wrong Thread
 50    //         await InvokeAsync(StateHasChanged);
 51    //     }, null, 0, 1000);
 52    // }
 53
 54    void StartStop()
 055    {
 056        if (string.IsNullOrEmpty(Input)) return;
 57
 058    }
 59
 60    void Reset()
 061    {
 62
 063    }
 64
 65    public void Start(int secondsToRun)
 066    {
 067        if (secondsToRun > 0)
 068        {
 069            Input = TimeSpan.FromSeconds(secondsToRun).ToString(@"mm\:ss");
 070            StateHasChanged();
 071            timer.Start();
 072        }
 073    }
 74
 75    public void Stop()
 076    {
 077        timer.Stop();
 078    }
 79
 80    protected override void OnInitialized()
 081    {
 082        timer = new Timer(1000);
 083        timer.Elapsed += OnTimedEvent;
 084        timer.AutoReset = true;
 085    }
 86
 87    private async void OnTimedEvent(object? sender, ElapsedEventArgs e)
 088    {
 089        secondsToRun--;
 90
 091        await InvokeAsync(() =>
 092        {
 093            Input = TimeSpan.FromSeconds(secondsToRun).ToString(@"mm\:ss");
 094            StateHasChanged();
 095        });
 96
 097        if (secondsToRun <= 0)
 098        {
 099            timer.Stop();
 0100            await TimerOut.InvokeAsync();
 0101        }
 0102    }
 103
 104    public void Dispose()
 0105    {
 0106        timer.Dispose();
 0107    }
 108
 109}
+
+
+
+ +
+ + \ No newline at end of file diff --git a/coverage/Utility_UnicodePicker.html b/coverage/Utility_UnicodePicker.html new file mode 100644 index 00000000..dcd09bcd --- /dev/null +++ b/coverage/Utility_UnicodePicker.html @@ -0,0 +1,1243 @@ + + + + + + + +Utility.Components.UnicodePicker.UnicodePicker - Coverage Report + +
+

< Summary

+
+
+
Information
+
+
+ + + + + + + + + + + + + + + + + +
Class:Utility.Components.UnicodePicker.UnicodePicker
Assembly:Utility
File(s):/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Components/UnicodePicker/UnicodePicker.razor
Tag:106_9081424346
+
+
+
+
+
+
+
Line coverage
+
+
0%
+
+ + + + + + + + + + + + + + + + + + + + + +
Covered lines:0
Uncovered lines:1
Coverable lines:1
Total lines:105
Line coverage:0%
+
+
+
+
+
Branch coverage
+
+
N/A
+
+ + + + + + + + + + + + + +
Covered branches:0
Total branches:0
Branch coverage:N/A
+
+
+
+
+
Method coverage
+
+
+

Feature is only available for sponsors

+Upgrade to PRO version +
+
+
+
+

Metrics

+
+ +++++++ + + + + +
MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor()100%210%
+
+

File(s)

+

/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Components/UnicodePicker/UnicodePicker.razor

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#LineLine coverage
 1@using System.Text
 2@inject IJSRuntime JSRuntime
 3@inject HttpClient HttpClient
 4
 5<div class="container">
 6
 7    <div class="row">
 8        <div class="col">
 9            <p>⚠️ Takes a while to load</p>️
 10        </div>
 11    </div>
 12
 13    <div class="row">
 14        <div class="col">
 15
 16            <div>
 17                <table>
 18                @* @for (int i = 0; i <= (UnicodeCharacters.Count - 1) / 15; ++i) *@
 19                @* { *@
 20                @*     <tr> *@
 21                @*     @for (int j = 0; j < 15 && i + j < UnicodeCharacters.Count; ++j) *@
 22                @*     { *@
 23                @*         <td>@((MarkupString)@$"\u{UnicodeCharacters[i+j]}")<br />@UnicodeCharacters[i+j]</td> *@
 24                @*     } *@
 25                @*     </tr> *@
 26                @* } *@
 27                </table>
 28            </div>
 29
 30        </div>
 31    </div>
 32
 33    @* <div class="row"> *@
 34    @*     <div class="col"> *@
 35    @*         <button id="btnCopy" name="btnCopy" class="btn btn-info float-right" @onclick="Copy"><i class="far fa-cop
 36    @*     </div> *@
 37    @* </div> *@
 38
 39    <hr />
 40
 41    <div class="row">
 42        <div class="col">
 43            <p>Useful site <a href="https://shapecatcher.com" target="_blank">shapecatcher.com</a> Unicode Character Rec
 44            <p>Draw something in the box! And let shapecatcher help you to find the most similar unicode characters!</p>
 45            |
 46            <p><a href="https://util.unicode.org/UnicodeJsps/character.jsp" target="_blank">Unicode Utilities: Character
 47            |
 48            <p><a href="https://www.compart.com/en/unicode/U+0000" target="_blank">https://www.compart.com/en/unicode/U+
 49            <p>&#x1F494;</p>
 50        </div>
 51    </div>
 52
 53</div>
 54
 55@code {
 056    List<string?> UnicodeCharacters = new List<string>();
 57
 58    private string errorMessage;
 59
 60    // protected override async Task OnInitializedAsync()
 61    // {
 62    //     // HttpClient.DefaultRequestHeaders.Add("Access-Control-Allow-Origin", "*");
 63    //     // HttpClient.DefaultRequestHeaders.Add("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Ty
 64    //
 65    //     // var unicodeDataUrl = "https://www.unicode.org/Public/UCD/latest/ucd/UnicodeData.txt";
 66    //     var unicodeDataUrl = "data/UnicodeData.txt";
 67    //     var content = await HttpClient.GetStringAsync(unicodeDataUrl);
 68    //
 69    //     // foreach (var line in content.Split(new string[] { Environment.NewLine }, StringSplitOptions.None))
 70    //     // {
 71    //     //     // 0000;<control>;Cc;0;BN;;;;;N;NULL;;;;
 72    //     //     var unicode = line.Split(";");
 73    //     //     Console.WriteLine(unicode[0]);
 74    //     // }
 75    //
 76    //     UnicodeCharacters = content
 77    //         .Split(new string[] { System.Environment.NewLine }, StringSplitOptions.None)
 78    //         .Select(line => line.Split(";").FirstOrDefault())
 79    //         // .Select(u => $"&#x{u};")
 80    //         // .Select(u => $@"\u{u}")
 81    //         .ToList();
 82    //
 83    //     // UnicodeCharacters.Insert(0, "&#x1F494;");
 84    //     // UnicodeCharacters.Insert(0, "\u1F494");
 85    //     Console.WriteLine(UnicodeCharacters.Count());
 86    //
 87    //     string text = "\u2019";
 88    //     byte[] textBytes = Encoding.Unicode.GetBytes(text);
 89    //     Encoding.UTF8.GetString(Encoding.Convert(Encoding.Unicode, Encoding.UTF8, textBytes));
 90    //
 91    //     var escaped = System.Text.RegularExpressions.Regex.Unescape(@"\u2019");
 92    //     Console.WriteLine(escaped);
 93    // }
 94
 95    // private void Clear()
 96    // {
 97    //     Input = string.Empty;
 98    // }
 99    //
 100    // async Task Copy()
 101    // {
 102    //     await JSRuntime.InvokeVoidAsync("navigator.clipboard.writeText", Output);
 103    // }
 104
 105}
+
+
+
+
+

Methods/Properties

+.ctor()
+
+
+ + \ No newline at end of file diff --git a/coverage/Utility_UrlEncode.html b/coverage/Utility_UrlEncode.html new file mode 100644 index 00000000..c7d6dce4 --- /dev/null +++ b/coverage/Utility_UrlEncode.html @@ -0,0 +1,1209 @@ + + + + + + + +Utility.Components.UrlEncode.UrlEncode - Coverage Report + +
+

< Summary

+
+
+
Information
+
+
+ + + + + + + + + + + + + + + + + +
Class:Utility.Components.UrlEncode.UrlEncode
Assembly:Utility
File(s):/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Components/UrlEncode/UrlEncode.razor
Tag:106_9081424346
+
+
+
+
+
+
+
Line coverage
+
+
100%
+
+ + + + + + + + + + + + + + + + + + + + + +
Covered lines:8
Uncovered lines:0
Coverable lines:8
Total lines:67
Line coverage:100%
+
+
+
+
+
Branch coverage
+
+
N/A
+
+ + + + + + + + + + + + + +
Covered branches:0
Total branches:0
Branch coverage:N/A
+
+
+
+
+
Method coverage
+
+
+

Feature is only available for sponsors

+Upgrade to PRO version +
+
+
+
+

Metrics

+
+ +++++++ + + + + + + +
MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor()100%11100%
Encode()100%11100%
Decode()100%11100%
+
+

File(s)

+

/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Components/UrlEncode/UrlEncode.razor

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#LineLine coverage
 1@using System.Net;
 2@*@using System.Net.WebUtility;*@
 3
 4<div class="container">
 5
 6    <div class="row">
 7        <div class="col">
 8            <h2>Url Encode / Decode</h2>
 9        </div>
 10    </div>
 11
 12    <div class="row">
 13        <div class="col">
 14
 15            <div class="input-group">
 16                <div class="input-group-prepend">
 17                    <span class="input-group-text">Encode:</span>
 18                </div>
 19                <input id="urlEncode" name="urlEncode" class="form-control" @bind="url">
 20                <span class="input-group-btn">
 21                    <button id="btnEncode" name="btnEncode" @onclick="Encode" class="btn btn-success float-right">Encode
 22                </span>
 23            </div>
 24
 25        </div>
 26    </div>
 27
 28    <div class="row">
 29        <div class="col">
 30
 31            <div class="input-group">
 32                <div class="input-group-prepend">
 33                    <span class="input-group-text">Decode:</span>
 34                </div>
 35                <input id="urlDecode" name="urlDecode" class="form-control" @bind="dUrl">
 36                <div class="input-group-append">
 37                    <button id="btnDecode" name="btnDecode" @onclick="Decode" class="btn btn-success float-right">Decode
 38                </div>
 39            </div>
 40
 41        </div>
 42    </div>
 43
 44    <hr/>
 45
 46    <div class="row">
 47        <div class="col">
 48            <p>Inspired from <a href="https://meyerweb.com/eric/tools/dencoder/" target="_blank">meyerweb URL Decoder/En
 49        </div>
 50    </div>
 51</div>
 52
 53@code {
 54
 255    string url = "http://www.alexhedley.com";
 256    string dUrl = "";
 57
 58    private void Encode()
 159    {
 160        dUrl = WebUtility.UrlEncode(url);
 161    }
 62
 63    private void Decode()
 164    {
 165        url = WebUtility.UrlDecode(dUrl);
 166    }
 67}
+
+
+
+
+

Methods/Properties

+.ctor()
+Encode()
+Decode()
+
+
+ + \ No newline at end of file diff --git a/coverage/Utility_UrlSplitter.html b/coverage/Utility_UrlSplitter.html new file mode 100644 index 00000000..4176b889 --- /dev/null +++ b/coverage/Utility_UrlSplitter.html @@ -0,0 +1,1256 @@ + + + + + + + +Utility.Components.UrlSplitter.UrlSplitter - Coverage Report + +
+

< Summary

+
+
+
Information
+
+
+ + + + + + + + + + + + + + + + + +
Class:Utility.Components.UrlSplitter.UrlSplitter
Assembly:Utility
File(s):/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Components/UrlSplitter/UrlSplitter.razor
Tag:106_9081424346
+
+
+
+
+
+
+
Line coverage
+
+
100%
+
+ + + + + + + + + + + + + + + + + + + + + +
Covered lines:19
Uncovered lines:0
Coverable lines:19
Total lines:112
Line coverage:100%
+
+
+
+
+
Branch coverage
+
+
100%
+
+ + + + + + + + + + + + + +
Covered branches:2
Total branches:2
Branch coverage:100%
+
+
+
+
+
Method coverage
+
+
+

Feature is only available for sponsors

+Upgrade to PRO version +
+
+
+
+

Metrics

+
+ +++++++ + + + + + + + +
MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
BuildRenderTree(...)100%22100%
get_Path()100%11100%
OnInitialized()100%11100%
Split()100%11100%
+
+

File(s)

+

/home/runner/work/Utility-Blazor/Utility-Blazor/src/Utility/Components/UrlSplitter/UrlSplitter.razor

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#LineLine coverage
 1@using System.Web;
 2@using System.Collections.Specialized;
 3
 4<div class="container">
 5
 6    <div class="row">
 7        <div class="col">
 8            <h2>Url Splitter</h2>
 9        </div>
 10    </div>
 11
 12    <div class="row">
 13        <div class="col">
 14            <div class="input-group mb-3">
 15                <input type="text" id="path" name="path" class="form-control" @bind="Path">
 16                <div class="input-group-append">
 317                    <span class="input-group-text" id="urlCount">@pathLength</span>
 18                </div>
 19            </div>
 20        </div>
 21    </div>
 22    <div class="row">
 23        <div class="col">
 24            <button id="btnPathSplit" name="btnPathSplit" class="btn btn-success float-right"
 25                @onclick="Split">Split</button>
 26        </div>
 27    </div>
 28
 29    <br/>
 30
 31    <!-- Hostname -->
 32    <div class="row">
 33        <div class="col-12">
 34            <div class="input-group mb-3">
 35                <div class="input-group-prepend">
 36                    <span class="input-group-text">Hostname</span>
 37                </div>
 38                <input type="text" class="form-control" placeholder="hostname" aria-label="hostname"
 39                       id="hostname" name="hostname"
 40                       @bind="hostname" disabled>
 41            </div>
 42        </div>
 43    </div>
 44
 45    <!-- Pathname -->
 46    <div class="row">
 47        <div class="col-12">
 48            <div class="input-group mb-3">
 49                <div class="input-group-prepend">
 50                    <span class="input-group-text">Pathname</span>
 51                </div>
 52                <input type="text" class="form-control" placeholder="pathname" aria-label="pathname"
 53                       id="pathname" name="pathname"
 54                       @bind="pathName" disabled>
 55            </div>
 56        </div>
 57    </div>
 58
 59    <!-- Params -->
 60    <div class="row">
 61        <div class="col-12">
 62            <table id="urlParams">
 63                <thead>
 64                <tr>
 65                    <th>Key</th>
 66                    <th>Value</th>
 67                </tr>
 68                </thead>
 69                <tfoot></tfoot>
 70                <tbody>
 1371                @foreach (string key in queryString)
 272                {
 73                    <tr>
 274                        <td><em>@key</em></td>
 275                        <td><em>@queryString[key]</em></td>
 76                    </tr>
 277                }
 78                </tbody>
 79
 80            </table>
 81        </div>
 82    </div>
 83
 84</div>
 85
 86@code {
 87    [Parameter]
 1488    public string Path { get; set; }
 89
 90    int pathLength;
 91    string hostname;
 92    string pathName;
 93    NameValueCollection queryString;
 94
 95    protected override void OnInitialized()
 296    {
 297        Path = "https://www.alexhedley.com/path?query=this&param=that";
 298        pathLength = Path.Length;
 299        queryString = new NameValueCollection();
 2100    }
 101
 102    private void Split()
 1103    {
 1104        pathLength = Path.Length;
 105
 1106        Uri uri = new Uri(Path);
 1107        hostname = uri.Host;
 1108        pathName = uri.AbsolutePath;
 1109        queryString = HttpUtility.ParseQueryString(uri.Query);
 1110    }
 111
 112}
+
+
+
+ +
+ + \ No newline at end of file diff --git a/coverage/index.htm b/coverage/index.htm new file mode 100644 index 00000000..9d186d25 --- /dev/null +++ b/coverage/index.htm @@ -0,0 +1,1433 @@ + + + + + + + +Summary - Coverage Report + +
+

SummaryStarSponsor

+
+
+
Information
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Parser:Cobertura
Assemblies:2
Classes:38
Files:37
Tag:106_9081424346
Coverage date:05/14/2024 - 14:46:38
+
+
+
+
+
Line coverage
+
+
19%
+
+ + + + + + + + + + + + + + + + + + + + + +
Covered lines:158
Uncovered lines:649
Coverable lines:807
Total lines:2948
Line coverage:19.5%
+
+
+
+
+
Branch coverage
+
+
15%
+
+ + + + + + + + + + + + + +
Covered branches:24
Total branches:154
Branch coverage:15.5%
+
+
+
+
+
Method coverage
+
+
+

Feature is only available for sponsors

+Upgrade to PRO version +
+
+
+
+

Risk Hotspots

+ + + +

Coverage

+ +
+ +++++++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Line coverageBranch coverage
NameCoveredUncoveredCoverableTotalPercentageCoveredTotalPercentage
Utility158632790291020%
  
2414416.6%
  
Program088190%
 
00
 
Utility.Components.Ascii.Ascii01515680%
 
00
 
Utility.Components.Base64.Base64186249275%
  
44100%
 
Utility.Components.Binary.Binary02323660%
 
020%
 
Utility.Components.EpochConverter.EpochConverter01414720%
 
00
 
Utility.Components.GuidGenerator.GuidGenerator26295519947.2%
  
4850%
  
Utility.Components.HCF.HCF01341342670%
 
0340%
 
Utility.Components.HextoDec.HextoDec088560%
 
00
 
Utility.Components.HexToRGB.HexToRGB01313870%
 
00
 
Utility.Components.HTMLEncodeDecode.HTMLEncodeDecode126187566.6%
  
00
 
Utility.Components.JWTDebugger.JWTDebugger127198763.1%
  
22100%
 
Utility.Components.LuhnChecker.LuhnChecker183218985.7%
  
6875%
  
Utility.Components.MarkdownConverter.MarkdownConverter90959100%
 
00
 
Utility.Components.MD5Converter.MD5Converter01212730%
 
00
 
Utility.Components.MemoryConverter.MemoryConverter22103210568.7%
  
4850%
  
Utility.Components.MonacoDiffEditor.MonacoDiffEditor03434950%
 
040%
 
Utility.Components.MonacoEditor.MonacoEditor01616540%
 
040%
 
Utility.Components.SiteSettings01212230%
 
00
 
Utility.Components.SiteSettingsPanel02323920%
 
040%
 
Utility.Components.SQLContains.SQLContains14122610553.8%
  
22100%
 
Utility.Components.SQLInClause.SQLInClause02222820%
 
060%
 
Utility.Components.SQLInput.SQLInput02121750%
 
00
 
Utility.Components.Stopwatch.Stopwatch043431090%
 
060%
 
Utility.Components.StringConverter.StringConverter039391110%
 
0400%
 
Utility.Components.TimeConverter.TimeConverter01616760%
 
00
 
Utility.Components.TimerControl.TimerControl041411090%
 
060%
 
Utility.Components.UnicodePicker.UnicodePicker0111050%
 
00
 
Utility.Components.UrlEncode.UrlEncode80867100%
 
00
 
Utility.Components.UrlSplitter.UrlSplitter19019112100%
 
22100%
 
Utility.Constants01160%
 
00
 
Utility.Infrastructure.CacheStorageAccessor03636590%
 
020%
 
Utility.Pages.Index044490%
 
00
 
Utility.Pages.SQLBuilder022550%
 
00
 
Utility.Shared.MainLayout02020790%
 
020%
 
Utility.Shared.NavMenu011330%
 
00
 
Utility.Common017171140%
 
0100%
 
Utility.Common.InvertCharExtension055380%
 
040%
 
Utility.Common.InvertStringExtension066380%
 
020%
 
Utility.Common.StringExtensions066380%
 
040%
 
+
+
+
+ + \ No newline at end of file diff --git a/coverage/index.html b/coverage/index.html new file mode 100644 index 00000000..9d186d25 --- /dev/null +++ b/coverage/index.html @@ -0,0 +1,1433 @@ + + + + + + + +Summary - Coverage Report + +
+

SummaryStarSponsor

+
+
+
Information
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Parser:Cobertura
Assemblies:2
Classes:38
Files:37
Tag:106_9081424346
Coverage date:05/14/2024 - 14:46:38
+
+
+
+
+
Line coverage
+
+
19%
+
+ + + + + + + + + + + + + + + + + + + + + +
Covered lines:158
Uncovered lines:649
Coverable lines:807
Total lines:2948
Line coverage:19.5%
+
+
+
+
+
Branch coverage
+
+
15%
+
+ + + + + + + + + + + + + +
Covered branches:24
Total branches:154
Branch coverage:15.5%
+
+
+
+
+
Method coverage
+
+
+

Feature is only available for sponsors

+Upgrade to PRO version +
+
+
+
+

Risk Hotspots

+ + + +

Coverage

+ +
+ +++++++++++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Line coverageBranch coverage
NameCoveredUncoveredCoverableTotalPercentageCoveredTotalPercentage
Utility158632790291020%
  
2414416.6%
  
Program088190%
 
00
 
Utility.Components.Ascii.Ascii01515680%
 
00
 
Utility.Components.Base64.Base64186249275%
  
44100%
 
Utility.Components.Binary.Binary02323660%
 
020%
 
Utility.Components.EpochConverter.EpochConverter01414720%
 
00
 
Utility.Components.GuidGenerator.GuidGenerator26295519947.2%
  
4850%
  
Utility.Components.HCF.HCF01341342670%
 
0340%
 
Utility.Components.HextoDec.HextoDec088560%
 
00
 
Utility.Components.HexToRGB.HexToRGB01313870%
 
00
 
Utility.Components.HTMLEncodeDecode.HTMLEncodeDecode126187566.6%
  
00
 
Utility.Components.JWTDebugger.JWTDebugger127198763.1%
  
22100%
 
Utility.Components.LuhnChecker.LuhnChecker183218985.7%
  
6875%
  
Utility.Components.MarkdownConverter.MarkdownConverter90959100%
 
00
 
Utility.Components.MD5Converter.MD5Converter01212730%
 
00
 
Utility.Components.MemoryConverter.MemoryConverter22103210568.7%
  
4850%
  
Utility.Components.MonacoDiffEditor.MonacoDiffEditor03434950%
 
040%
 
Utility.Components.MonacoEditor.MonacoEditor01616540%
 
040%
 
Utility.Components.SiteSettings01212230%
 
00
 
Utility.Components.SiteSettingsPanel02323920%
 
040%
 
Utility.Components.SQLContains.SQLContains14122610553.8%
  
22100%
 
Utility.Components.SQLInClause.SQLInClause02222820%
 
060%
 
Utility.Components.SQLInput.SQLInput02121750%
 
00
 
Utility.Components.Stopwatch.Stopwatch043431090%
 
060%
 
Utility.Components.StringConverter.StringConverter039391110%
 
0400%
 
Utility.Components.TimeConverter.TimeConverter01616760%
 
00
 
Utility.Components.TimerControl.TimerControl041411090%
 
060%
 
Utility.Components.UnicodePicker.UnicodePicker0111050%
 
00
 
Utility.Components.UrlEncode.UrlEncode80867100%
 
00
 
Utility.Components.UrlSplitter.UrlSplitter19019112100%
 
22100%
 
Utility.Constants01160%
 
00
 
Utility.Infrastructure.CacheStorageAccessor03636590%
 
020%
 
Utility.Pages.Index044490%
 
00
 
Utility.Pages.SQLBuilder022550%
 
00
 
Utility.Shared.MainLayout02020790%
 
020%
 
Utility.Shared.NavMenu011330%
 
00
 
Utility.Common017171140%
 
0100%
 
Utility.Common.InvertCharExtension055380%
 
040%
 
Utility.Common.InvertStringExtension066380%
 
020%
 
Utility.Common.StringExtensions066380%
 
040%
 
+
+
+
+ + \ No newline at end of file