Interface IRevisionComparer<TRevision>
Interface for an object that can be used to compare a TRevision type.
Namespace: SociallyDistant.Core.Core.Serialization
Assembly: SociallyDistant.Framework.dll
Syntax
public interface IRevisionComparer<TRevision> where TRevision : Enum
Type Parameters
| Name | Description |
|---|---|
| TRevision | The type of file revision to compare. Should be an enum type. |
Properties
Current
Gets the revision of the current file.
Declaration
TRevision Current { get; }
Property Value
| Type | Description |
|---|---|
| TRevision |
Earliest
Gets the earliest possible file revision.
Declaration
TRevision Earliest { get; }
Property Value
| Type | Description |
|---|---|
| TRevision |
Latest
Gets the latest possible file revision.
Declaration
TRevision Latest { get; }
Property Value
| Type | Description |
|---|---|
| TRevision |
Methods
IsCurrent(TRevision)
Checks if the provided revision is the current revision.
Declaration
bool IsCurrent(TRevision revision)
Parameters
| Type | Name | Description |
|---|---|---|
| TRevision | revision | The revision to check. |
Returns
| Type | Description |
|---|---|
| bool | True if current, false otherwise. |
IsCurrentOrNewer(TRevision)
Checks if the provided revision is newer than or the same as the current revision.
Declaration
bool IsCurrentOrNewer(TRevision revision)
Parameters
| Type | Name | Description |
|---|---|---|
| TRevision | revision | The revision to check. |
Returns
| Type | Description |
|---|---|
| bool | True if current or newer, false otherwise. |
IsCurrentOrOlder(TRevision)
Checks if the provided revision is older than or the same as the current revision.
Declaration
bool IsCurrentOrOlder(TRevision revision)
Parameters
| Type | Name | Description |
|---|---|---|
| TRevision | revision | The revision to check. |
Returns
| Type | Description |
|---|---|
| bool | True if current or older, false otherwise. |
IsNewer(TRevision)
Declaration
bool IsNewer(TRevision revision)
Parameters
| Type | Name | Description |
|---|---|---|
| TRevision | revision |
Returns
| Type | Description |
|---|---|
| bool |
IsOlder(TRevision)
Declaration
bool IsOlder(TRevision revision)
Parameters
| Type | Name | Description |
|---|---|---|
| TRevision | revision |
Returns
| Type | Description |
|---|---|
| bool |