< Summary

Information
Class: MyNet.UI.ViewModels.Shell.ShellDrawerServiceExtensions
Assembly: MyNet.UI
File(s): https://raw.githubusercontent.com/sandre58/MyNet/85372080fe102cd9ee155ceab49ae000e7f66103/src/MyNet.UI/ViewModels/Shell/Extensions/ShellDrawerServiceExtensions.cs
Tag: 323_28699572109
Line coverage
33%
Covered lines: 2
Uncovered lines: 4
Coverable lines: 6
Total lines: 55
Line coverage: 33.3%
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
ShowNotificationsDrawer(...)100%11100%
HideNotificationsDrawer(...)100%210%
ToggleNotificationsDrawer(...)100%210%
ShowFileMenuDrawer(...)100%210%
HideFileMenuDrawer(...)100%210%
ToggleFileMenuDrawer(...)100%11100%

File(s)

https://raw.githubusercontent.com/sandre58/MyNet/85372080fe102cd9ee155ceab49ae000e7f66103/src/MyNet.UI/ViewModels/Shell/Extensions/ShellDrawerServiceExtensions.cs

#LineLine coverage
 1// -----------------------------------------------------------------------
 2// <copyright file="ShellDrawerServiceExtensions.cs" company="Stéphane ANDRE">
 3// Copyright (c) Stéphane ANDRE. All rights reserved.
 4// </copyright>
 5// -----------------------------------------------------------------------
 6
 7#pragma warning disable IDE0130
 8namespace MyNet.UI.ViewModels.Shell;
 9#pragma warning restore IDE0130
 10
 11/// <summary>
 12/// Convenience helpers for <see cref="IShellDrawerService"/>.
 13/// </summary>
 14public static class ShellDrawerServiceExtensions
 15{
 16    extension(IShellDrawerService shellDrawerService)
 17    {
 18        /// <summary>
 19        /// Shows the notifications drawer.
 20        /// </summary>
 21        public void ShowNotificationsDrawer() =>
 322            shellDrawerService.SetNotificationsDrawer(ShellDrawerAction.Show);
 23
 24        /// <summary>
 25        /// Hides the notifications drawer.
 26        /// </summary>
 27        public void HideNotificationsDrawer() =>
 028            shellDrawerService.SetNotificationsDrawer(ShellDrawerAction.Hide);
 29
 30        /// <summary>
 31        /// Toggles the notifications drawer.
 32        /// </summary>
 33        public void ToggleNotificationsDrawer() =>
 034            shellDrawerService.SetNotificationsDrawer(ShellDrawerAction.Toggle);
 35
 36        /// <summary>
 37        /// Shows the file menu drawer when supported by the host.
 38        /// </summary>
 39        public void ShowFileMenuDrawer() =>
 040            shellDrawerService.SetFileMenuDrawer(ShellDrawerAction.Show);
 41
 42        /// <summary>
 43        /// Hides the file menu drawer when supported by the host.
 44        /// </summary>
 45        public void HideFileMenuDrawer() =>
 046            shellDrawerService.SetFileMenuDrawer(ShellDrawerAction.Hide);
 47
 48        /// <summary>
 49        /// Toggles the file menu drawer when supported by the host.
 50        /// </summary>
 51        public void ToggleFileMenuDrawer() =>
 352            shellDrawerService.SetFileMenuDrawer(ShellDrawerAction.Toggle);
 53    }
 54}
 55