< 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: 231_14069517506
Line coverage
0%
Covered lines: 0
Uncovered lines: 11
Coverable lines: 11
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
.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>
 33                    <td>@Char</td>
 34                    <td>@Dec</td>
 35                    <td>@Hex</td>
 36                    <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}

Methods/Properties

.ctor()
GetAsciiValues()