< Summary

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

https://raw.githubusercontent.com/sandre58/MyNet/85372080fe102cd9ee155ceab49ae000e7f66103/src/MyNet.UI/ViewModels/Crud/ItemChangedEventArgs.cs

#LineLine coverage
 1// -----------------------------------------------------------------------
 2// <copyright file="ItemChangedEventArgs.cs" company="Stéphane ANDRE">
 3// Copyright (c) Stéphane ANDRE. All rights reserved.
 4// </copyright>
 5// -----------------------------------------------------------------------
 6
 7using System;
 8
 9namespace MyNet.UI.ViewModels.Crud;
 10
 11/// <summary>
 12/// Event arguments for an item change, containing the old and new values of the item.
 13/// </summary>
 14/// <param name="oldItem">The previous item value.</param>
 15/// <param name="newItem">The new item value.</param>
 16/// <typeparam name="T">The type of the item.</typeparam>
 617public class ItemChangedEventArgs<T>(T? oldItem, T? newItem) : EventArgs
 18{
 19    /// <summary>
 20    /// Gets the previous item value before the change.
 21    /// </summary>
 622    public T? OldItem { get; } = oldItem;
 23
 24    /// <summary>
 25    /// Gets the new item value after the change.
 26    /// </summary>
 627    public T? NewItem { get; } = newItem;
 28}
 29

Methods/Properties

.ctor(T,T)