< Summary

Information
Class: TELBlazor.Components.Core.TELComponentBase
Assembly: TELBlazor.Components
File(s): /home/runner/work/TELBlazor/TELBlazor/TELBlazor.Components/Core/TELComponentBase.cs
Line coverage
100%
Covered lines: 8
Uncovered lines: 0
Coverable lines: 8
Total lines: 28
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_TELBlazorBaseComponentConfiguration()100%11100%
get_Logger()100%11100%
get_JSEnabled()100%11100%
get_HostType()100%11100%
OnInitialized()100%11100%

File(s)

/home/runner/work/TELBlazor/TELBlazor/TELBlazor.Components/Core/TELComponentBase.cs

#LineLine coverage
 1using Microsoft.AspNetCore.Components;
 2using Microsoft.Extensions.Logging;
 3using TELBlazor.Components.Core.Configuration;
 4
 5namespace TELBlazor.Components.Core
 6{
 7    /// <summary>
 8    /// Base class for TEL Blazor components.
 9    /// Provides shared configuration and logging functionality.
 10    /// </summary>
 11    public class TELComponentBase : ComponentBase
 12    {
 13        // this will receive server version prerender and then client side if received must be true
 14        [Inject]
 10815        private ITELBlazorBaseComponentConfiguration TELBlazorBaseComponentConfiguration { get; set; } = default!;
 16
 17        [Inject]
 9018        public ILogger<TELComponentBase> Logger { get; set; } = default!;
 19
 1820        protected bool JSEnabled => TELBlazorBaseComponentConfiguration.JSEnabled;
 1821        protected string HostType => TELBlazorBaseComponentConfiguration.HostType;
 22        protected override void OnInitialized()
 1823        {
 1824            base.OnInitialized();
 1825            Logger.LogInformation("TEL base component initialised made by {HostType}, JsEnabled is {JsEnabled}", HostTyp
 1826        }
 27    }
 28}