< Summary

Information
Class: MyNet.UI.Dialogs.FileDialogs.FileDialogResult
Assembly: MyNet.UI
File(s): https://raw.githubusercontent.com/sandre58/MyNet/85372080fe102cd9ee155ceab49ae000e7f66103/src/MyNet.UI/Dialogs/FileDialogs/FileDialogResult.cs
Tag: 323_28699572109
Line coverage
100%
Covered lines: 1
Uncovered lines: 0
Coverable lines: 1
Total lines: 31
Line coverage: 100%
Branch coverage
100%
Covered branches: 2
Total branches: 2
Branch coverage: 100%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Filename()100%22100%

File(s)

https://raw.githubusercontent.com/sandre58/MyNet/85372080fe102cd9ee155ceab49ae000e7f66103/src/MyNet.UI/Dialogs/FileDialogs/FileDialogResult.cs

#LineLine coverage
 1// -----------------------------------------------------------------------
 2// <copyright file="FileDialogResult.cs" company="Stéphane ANDRE">
 3// Copyright (c) Stéphane ANDRE. All rights reserved.
 4// </copyright>
 5// -----------------------------------------------------------------------
 6
 7using System.Collections.Generic;
 8
 9namespace MyNet.UI.Dialogs.FileDialogs;
 10
 11/// <summary>
 12/// Represents the result of a file dialog operation, including whether the operation was canceled and the list of selec
 13/// </summary>
 14public sealed class FileDialogResult
 15{
 16    /// <summary>
 17    /// Gets a value indicating whether the file dialog operation was canceled by the user. If true, no files were selec
 18    /// </summary>
 19    public bool IsCancelled { get; init; }
 20
 21    /// <summary>
 22    /// Gets the list of file paths selected by the user in the file dialog. This list is empty if the operation was can
 23    /// </summary>
 24    public IReadOnlyList<string> Files { get; init; } = [];
 25
 26    /// <summary>
 27    /// Gets the first file path from the list of selected files, or null if no files were selected. This is a convenien
 28    /// </summary>
 629    public string? Filename => Files.Count > 0 ? Files[0] : null;
 30}
 31

Methods/Properties

get_Filename()