File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ namespace WindowsAppCommunity . Sdk ;
2+
3+ /// <summary>
4+ /// An in-memory implementation of <see cref="IReadOnlyConnection"/>.
5+ /// </summary>
6+ /// <remarks>
7+ /// This class is used to create a basic connection value to be added to a collection.
8+ /// </remarks>
9+ public class InMemoryConnection : IReadOnlyConnection
10+ {
11+ /// <summary>
12+ /// An Id for the connection.
13+ /// </summary>
14+ public required string Id { get ; init ; }
15+
16+ /// <summary>
17+ /// The value of the connection.
18+ /// </summary>
19+ public required string Value { get ; init ; }
20+
21+ /// <inheritdoc/>
22+ public Task < string > GetValueAsync ( CancellationToken cancellationToken = default )
23+ {
24+ return Task . FromResult ( Value ) ;
25+ }
26+
27+ /// <inheritdoc/>
28+ public event EventHandler < string > ? ValueUpdated ;
29+ }
You can’t perform that action at this time.
0 commit comments