| | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 2 | | // Licensed under the MIT License. |
| | 3 | |
|
| | 4 | | namespace Azure.Data.AppConfiguration |
| | 5 | | { |
| | 6 | | internal readonly struct SyncToken |
| | 7 | | { |
| | 8 | | /// <summary> |
| | 9 | | /// The token's ID. |
| | 10 | | /// </summary> |
| 1108 | 11 | | public string Id { get; } |
| | 12 | |
|
| | 13 | | /// <summary> |
| | 14 | | /// The token's value. |
| | 15 | | /// </summary> |
| 488 | 16 | | public string Value { get; } |
| | 17 | |
|
| | 18 | | /// <summary> |
| | 19 | | /// Token sequence number (version). Higher means newer version of the same token. |
| | 20 | | /// </summary> |
| 836 | 21 | | public long SequenceNumber { get; } |
| | 22 | |
|
| | 23 | | public SyncToken(string id, string value, long sequenceNumber) |
| | 24 | | { |
| 624 | 25 | | Id = id; |
| 624 | 26 | | Value = value; |
| 624 | 27 | | SequenceNumber = sequenceNumber; |
| 624 | 28 | | } |
| | 29 | |
|
| | 30 | | /// <summary> |
| | 31 | | /// Creates a string representation of a <see cref="SyncToken"/>. |
| | 32 | | /// </summary> |
| | 33 | | public override string ToString() |
| | 34 | | { |
| 484 | 35 | | return $"{Id}={Value}"; |
| | 36 | | } |
| | 37 | | } |
| | 38 | | } |