Skip to content

Feature/improve cartesian coordinate serialization #330

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions docs/CodeDoc/Atc/Atc.Factories.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,21 @@ Provides factory methods for creating instances of `System.Collections.Generic.I

### Static Methods

#### EmptyAsyncEnumerable
#### Empty
>```csharp
>IAsyncEnumerable<T> EmptyAsyncEnumerable()
>IAsyncEnumerable<T> Empty()
>```
><b>Summary:</b> Returns an empty `System.Collections.Generic.IAsyncEnumerable`1`.
>
><b>Returns:</b> An empty `System.Collections.Generic.IAsyncEnumerable`1`.
#### FromSingleItem
>```csharp
>IAsyncEnumerable<T> FromSingleItem(T item)
>```
><b>Summary:</b> Converts a single item into an `System.Collections.Generic.IAsyncEnumerable`1`.
>
><b>Parameters:</b><br>
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;`item`&nbsp;&nbsp;-&nbsp;&nbsp;The item to convert.<br />
>
><b>Returns:</b> An `System.Collections.Generic.IAsyncEnumerable`1` containing the single item.
<hr /><div style='text-align: right'><i>Generated by MarkdownCodeDoc version 1.2</i></div>
3 changes: 2 additions & 1 deletion docs/CodeDoc/Atc/IndexExtended.md
Original file line number Diff line number Diff line change
Expand Up @@ -4395,7 +4395,8 @@

- [AsyncEnumerableFactory](Atc.Factories.md#asyncenumerablefactory)
- Static Methods
- EmptyAsyncEnumerable()
- Empty()
- FromSingleItem(T item)

## [Atc.Helpers](Atc.Helpers.md)

Expand Down
4 changes: 3 additions & 1 deletion src/Atc/Structs/CartesianCoordinate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public record struct CartesianCoordinate(double Latitude = 0, double Longitude =
/// <value>
/// <c>true</c> if this instance is default; otherwise, <c>false</c>.
/// </value>
[JsonIgnore]
public readonly bool IsDefault => Latitude.IsEqual(0) && Longitude.IsEqual(0);

/// <summary>
Expand All @@ -23,8 +24,9 @@ public readonly bool Equals(CartesianCoordinate other) =>
Latitude.AreClose(other.Latitude) &&
Longitude.AreClose(other.Longitude);

/// <inheritdoc />
public override readonly int GetHashCode()
=> base.GetHashCode();
=> HashCode.Combine(Latitude, Longitude);

/// <inheritdoc />
public override readonly string ToString()
Expand Down