-
Notifications
You must be signed in to change notification settings - Fork 0
/
IHaveAValue{TValue}.cs
37 lines (34 loc) · 1.06 KB
/
IHaveAValue{TValue}.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*
* IHaveAValue{TValue}.cs
*
* Created: 2023-03-13-05:50:24
* Modified: 2023-03-29-12:12:07
*
* Author: David G. Moore, Jr. <[email protected]>
*
* Copyright © 2022 - 2023 David G. Moore, Jr., All Rights Reserved
* License: MIT (https://opensource.org/licenses/MIT)
*/
namespace Dgmjr.Abstractions;
/// <summary>
/// Defines a mechanism for objects that have a read-only value of type <typeparamref name="TValue"/>.
/// </summary>
/// <typeparam name="TValue">The type of the value.</typeparam>
public interface IHaveAValue<TValue>
{
/// <summary>
/// Gets the value of the object.
/// </summary>
TValue Value { get; }
}
/// <summary>
/// Defines a mechanism for objects that have a writable value of type <typeparamref name="TValue"/>.
/// </summary>
/// <typeparam name="TValue">The type of the value.</typeparam>
public interface IHaveAWritableValue<TValue> : IHaveAValue<TValue>
{
/// <summary>
/// Gets or sets the value of the object.
/// </summary>
new TValue Value { get; set; }
}