< Summary

Information
Class: Allyaria.Theming.Helpers.ThemeApplier
Assembly: Allyaria.Theming
File(s): /home/runner/work/allyaria/allyaria/src/Allyaria.Theming/Helpers/ThemeApplier.cs
Line coverage
100%
Covered lines: 2
Uncovered lines: 0
Coverable lines: 2
Total lines: 36
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%

File(s)

/home/runner/work/allyaria/allyaria/src/Allyaria.Theming/Helpers/ThemeApplier.cs

#LineLine coverage
 1namespace Allyaria.Theming.Helpers;
 2
 3/// <summary>
 4/// Represents a basic style application utility that creates a single <see cref="ThemeUpdater" /> for a specified
 5/// <see cref="StyleType" /> and applies it to a component within the theme structure.
 6/// </summary>
 7/// <remarks>
 8///     <para>
 9///     The <see cref="ThemeApplier" /> is a concrete implementation of <see cref="ThemeApplierBase" />. It provides a
 10///     simplified entry point for applying a single style type—such as margin, padding, or color—to a particular
 11///     <see cref="ComponentType" />.
 12///     </para>
 13///     <para>
 14///     This class is commonly used during theme construction in <see cref="ThemeBuilder" /> to apply foundational style
 15///     such as layout spacing and element sizing.
 16///     </para>
 17/// </remarks>
 18internal sealed class ThemeApplier : ThemeApplierBase
 19{
 20    /// <summary>
 21    /// Initializes a new instance of the <see cref="ThemeApplier" /> class, creating a <see cref="ThemeUpdater" /> for 
 22    /// specified style type and value.
 23    /// </summary>
 24    /// <param name="themeMapper">The <see cref="ThemeMapper" /> instance used for theme mapping operations.</param>
 25    /// <param name="isHighContrast">Specifies whether this applier operates in high-contrast mode.</param>
 26    /// <param name="componentType">The <see cref="ComponentType" /> to which this style applies.</param>
 27    /// <param name="styleType">The <see cref="StyleType" /> representing the style to be applied.</param>
 28    /// <param name="value">The <see cref="IStyleValue" /> representing the style’s assigned value.</param>
 29    public ThemeApplier(ThemeMapper themeMapper,
 30        bool isHighContrast,
 31        ComponentType componentType,
 32        StyleType styleType,
 33        IStyleValue value)
 19634        : base(themeMapper: themeMapper, isHighContrast: isHighContrast, componentType: componentType)
 19635        => Add(item: CreateUpdater(styleType: styleType, value: value));
 36}