< Summary

Information
Class: MyNet.Utilities.Caching.ExpiringEventArgs<T1, T2>
Assembly: MyNet.Utilities
File(s): https://raw.githubusercontent.com/sandre58/MyNet/85372080fe102cd9ee155ceab49ae000e7f66103/src/MyNet.Utilities/Caching/ExpiringEventArgs.cs
Tag: 323_28699572109
Line coverage
100%
Covered lines: 4
Uncovered lines: 0
Coverable lines: 4
Total lines: 48
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.Utilities/Caching/ExpiringEventArgs.cs

#LineLine coverage
 1// -----------------------------------------------------------------------
 2// <copyright file="ExpiringEventArgs.cs" company="Stéphane ANDRE">
 3// Copyright (c) Stéphane ANDRE. All rights reserved.
 4// </copyright>
 5// -----------------------------------------------------------------------
 6
 7using System;
 8using MyNet.Utilities.Caching.Policies;
 9
 10namespace MyNet.Utilities.Caching;
 11
 12/// <summary>
 13/// The expiring event args.
 14/// </summary>
 15/// <typeparam name="TKey">The key type.</typeparam>
 16/// <typeparam name="TValue">The value type.</typeparam>
 17/// <remarks>
 18/// Initializes a new instance of the <see cref="ExpiringEventArgs{TKey, TValue}" /> class.
 19/// </remarks>
 20/// <param name="key">The key.</param>
 21/// <param name="value">The value.</param>
 22/// <param name="expirationPolicy">The expiration policy.</param>
 623public class ExpiringEventArgs<TKey, TValue>(TKey key, TValue value, ExpirationPolicy? expirationPolicy) : EventArgs
 24{
 25    /// <summary>
 26    /// Gets or sets a value indicating whether the expiration of value should be canceled and the value should stay in 
 27    /// </summary>
 28    /// <value><c>true</c> if cancelled; otherwise, <c>false</c>.</value>
 29    public bool Cancel { get; set; }
 30
 31    /// <summary>
 32    /// Gets or sets the expiration policy.
 33    /// </summary>
 634    public ExpirationPolicy? ExpirationPolicy { get; set; } = expirationPolicy;
 35
 36    /// <summary>
 37    /// Gets the key.
 38    /// </summary>
 39    /// <value>The key.</value>
 640    public TKey Key { get; private set; } = key;
 41
 42    /// <summary>
 43    /// Gets the value.
 44    /// </summary>
 45    /// <value>The value.</value>
 646    public TValue Value { get; private set; } = value;
 47}
 48