< Summary

Information
Class: MyNet.UI.ViewModels.Export.ExportColumnViewModel<T>
Assembly: MyNet.UI
File(s): https://raw.githubusercontent.com/sandre58/MyNet/85372080fe102cd9ee155ceab49ae000e7f66103/src/MyNet.UI/ViewModels/Export/ExportColumnViewModel.cs
Tag: 323_28699572109
Line coverage
0%
Covered lines: 0
Uncovered lines: 6
Coverable lines: 6
Total lines: 43
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%
set_IsSelected(...)100%210%

File(s)

https://raw.githubusercontent.com/sandre58/MyNet/85372080fe102cd9ee155ceab49ae000e7f66103/src/MyNet.UI/ViewModels/Export/ExportColumnViewModel.cs

#LineLine coverage
 1// -----------------------------------------------------------------------
 2// <copyright file="ExportColumnViewModel.cs" company="Stéphane ANDRE">
 3// Copyright (c) Stéphane ANDRE. All rights reserved.
 4// </copyright>
 5// -----------------------------------------------------------------------
 6
 7namespace MyNet.UI.ViewModels.Export;
 8
 9/// <summary>
 10/// Represents a selectable export column.
 11/// </summary>
 12/// <typeparam name="TColumn">The column metadata type.</typeparam>
 13public sealed class ExportColumnViewModel<TColumn> : ViewModelBase
 14{
 15    /// <summary>
 16    /// Initializes a new instance of the <see cref="ExportColumnViewModel{TColumn}"/> class.
 17    /// </summary>
 18    /// <param name="column">The column metadata.</param>
 19    /// <param name="key">The unique column key.</param>
 20    /// <param name="isSelected">Whether this column is selected for export.</param>
 021    public ExportColumnViewModel(TColumn column, string key, bool isSelected)
 22    {
 023        Column = column;
 024        Key = key;
 025        IsSelected = isSelected;
 026    }
 27
 28    /// <summary>
 29    /// Gets the column metadata.
 30    /// </summary>
 31    public TColumn Column { get; }
 32
 33    /// <summary>
 34    /// Gets the unique column key.
 35    /// </summary>
 36    public string Key { get; }
 37
 38    /// <summary>
 39    /// Gets or sets a value indicating whether the column is selected.
 40    /// </summary>
 041    public bool IsSelected { get; set => SetProperty(ref field, value); }
 42}
 43