Skip to content
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

Move GeoJson types to Azure.Core #21208

Merged
merged 7 commits into from
May 20, 2021
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
Original file line number Diff line number Diff line change
Expand Up @@ -192,163 +192,3 @@ public partial class ProtocolClientOptions : Azure.Core.ClientOptions
public ProtocolClientOptions() { }
}
}
namespace Azure.Core.GeoJson
{
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
public readonly partial struct GeoArray<T> : System.Collections.Generic.IEnumerable<T>, System.Collections.IEnumerable
{
private readonly object _dummy;
private readonly int _dummyPrimitive;
public int Count { get { throw null; } }
public T this[int index] { get { throw null; } }
public Azure.Core.GeoJson.GeoArray<T>.Enumerator GetEnumerator() { throw null; }
System.Collections.Generic.IEnumerator<T> System.Collections.Generic.IEnumerable<T>.GetEnumerator() { throw null; }
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; }
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
public partial struct Enumerator : System.Collections.Generic.IEnumerator<T>, System.Collections.IEnumerator, System.IDisposable
{
private object _dummy;
private int _dummyPrimitive;
public T Current { get { throw null; } }
object System.Collections.IEnumerator.Current { get { throw null; } }
public void Dispose() { }
public bool MoveNext() { throw null; }
public void Reset() { }
}
}
public sealed partial class GeoBoundingBox : System.IEquatable<Azure.Core.GeoJson.GeoBoundingBox>
{
public GeoBoundingBox(double west, double south, double east, double north) { }
public GeoBoundingBox(double west, double south, double east, double north, double? minAltitude, double? maxAltitude) { }
public double East { get { throw null; } }
public double this[int index] { get { throw null; } }
public double? MaxAltitude { get { throw null; } }
public double? MinAltitude { get { throw null; } }
public double North { get { throw null; } }
public double South { get { throw null; } }
public double West { get { throw null; } }
public bool Equals(Azure.Core.GeoJson.GeoBoundingBox other) { throw null; }
public override bool Equals(object? obj) { throw null; }
public override int GetHashCode() { throw null; }
public override string ToString() { throw null; }
}
public sealed partial class GeoCollection : Azure.Core.GeoJson.GeoObject, System.Collections.Generic.IEnumerable<Azure.Core.GeoJson.GeoObject>, System.Collections.Generic.IReadOnlyCollection<Azure.Core.GeoJson.GeoObject>, System.Collections.Generic.IReadOnlyList<Azure.Core.GeoJson.GeoObject>, System.Collections.IEnumerable
{
public GeoCollection(System.Collections.Generic.IEnumerable<Azure.Core.GeoJson.GeoObject> geometries) { }
public GeoCollection(System.Collections.Generic.IEnumerable<Azure.Core.GeoJson.GeoObject> geometries, Azure.Core.GeoJson.GeoBoundingBox? boundingBox, System.Collections.Generic.IReadOnlyDictionary<string, object?> customProperties) { }
public int Count { get { throw null; } }
public Azure.Core.GeoJson.GeoObject this[int index] { get { throw null; } }
public override Azure.Core.GeoJson.GeoObjectType Type { get { throw null; } }
public System.Collections.Generic.IEnumerator<Azure.Core.GeoJson.GeoObject> GetEnumerator() { throw null; }
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; }
}
public sealed partial class GeoJsonConverter : System.Text.Json.Serialization.JsonConverter<Azure.Core.GeoJson.GeoObject>
{
public GeoJsonConverter() { }
public override bool CanConvert(System.Type typeToConvert) { throw null; }
public override Azure.Core.GeoJson.GeoObject Read(ref System.Text.Json.Utf8JsonReader reader, System.Type typeToConvert, System.Text.Json.JsonSerializerOptions options) { throw null; }
public override void Write(System.Text.Json.Utf8JsonWriter writer, Azure.Core.GeoJson.GeoObject value, System.Text.Json.JsonSerializerOptions options) { }
}
public sealed partial class GeoLinearRing
{
public GeoLinearRing(System.Collections.Generic.IEnumerable<Azure.Core.GeoJson.GeoPosition> coordinates) { }
public Azure.Core.GeoJson.GeoArray<Azure.Core.GeoJson.GeoPosition> Coordinates { get { throw null; } }
}
public sealed partial class GeoLineString : Azure.Core.GeoJson.GeoObject
{
public GeoLineString(System.Collections.Generic.IEnumerable<Azure.Core.GeoJson.GeoPosition> coordinates) { }
public GeoLineString(System.Collections.Generic.IEnumerable<Azure.Core.GeoJson.GeoPosition> coordinates, Azure.Core.GeoJson.GeoBoundingBox? boundingBox, System.Collections.Generic.IReadOnlyDictionary<string, object?> customProperties) { }
public Azure.Core.GeoJson.GeoArray<Azure.Core.GeoJson.GeoPosition> Coordinates { get { throw null; } }
public override Azure.Core.GeoJson.GeoObjectType Type { get { throw null; } }
}
public sealed partial class GeoLineStringCollection : Azure.Core.GeoJson.GeoObject, System.Collections.Generic.IEnumerable<Azure.Core.GeoJson.GeoLineString>, System.Collections.Generic.IReadOnlyCollection<Azure.Core.GeoJson.GeoLineString>, System.Collections.Generic.IReadOnlyList<Azure.Core.GeoJson.GeoLineString>, System.Collections.IEnumerable
{
public GeoLineStringCollection(System.Collections.Generic.IEnumerable<Azure.Core.GeoJson.GeoLineString> lines) { }
public GeoLineStringCollection(System.Collections.Generic.IEnumerable<Azure.Core.GeoJson.GeoLineString> lines, Azure.Core.GeoJson.GeoBoundingBox? boundingBox, System.Collections.Generic.IReadOnlyDictionary<string, object?> customProperties) { }
public Azure.Core.GeoJson.GeoArray<Azure.Core.GeoJson.GeoArray<Azure.Core.GeoJson.GeoPosition>> Coordinates { get { throw null; } }
public int Count { get { throw null; } }
public Azure.Core.GeoJson.GeoLineString this[int index] { get { throw null; } }
public override Azure.Core.GeoJson.GeoObjectType Type { get { throw null; } }
public System.Collections.Generic.IEnumerator<Azure.Core.GeoJson.GeoLineString> GetEnumerator() { throw null; }
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; }
}
public abstract partial class GeoObject
{
internal GeoObject() { }
public Azure.Core.GeoJson.GeoBoundingBox? BoundingBox { get { throw null; } }
public abstract Azure.Core.GeoJson.GeoObjectType Type { get; }
public static Azure.Core.GeoJson.GeoObject Parse(string json) { throw null; }
public override string ToString() { throw null; }
public bool TryGetCustomProperty(string name, out object? value) { throw null; }
public void WriteTo(System.Text.Json.Utf8JsonWriter writer) { }
}
public enum GeoObjectType
{
Point = 0,
MultiPoint = 1,
Polygon = 2,
MultiPolygon = 3,
LineString = 4,
MultiLineString = 5,
GeometryCollection = 6,
}
public sealed partial class GeoPoint : Azure.Core.GeoJson.GeoObject
{
public GeoPoint(Azure.Core.GeoJson.GeoPosition position) { }
public GeoPoint(Azure.Core.GeoJson.GeoPosition position, Azure.Core.GeoJson.GeoBoundingBox? boundingBox, System.Collections.Generic.IReadOnlyDictionary<string, object?> customProperties) { }
public GeoPoint(double longitude, double latitude) { }
public GeoPoint(double longitude, double latitude, double? altitude) { }
public Azure.Core.GeoJson.GeoPosition Coordinates { get { throw null; } }
public override Azure.Core.GeoJson.GeoObjectType Type { get { throw null; } }
}
public sealed partial class GeoPointCollection : Azure.Core.GeoJson.GeoObject, System.Collections.Generic.IEnumerable<Azure.Core.GeoJson.GeoPoint>, System.Collections.Generic.IReadOnlyCollection<Azure.Core.GeoJson.GeoPoint>, System.Collections.Generic.IReadOnlyList<Azure.Core.GeoJson.GeoPoint>, System.Collections.IEnumerable
{
public GeoPointCollection(System.Collections.Generic.IEnumerable<Azure.Core.GeoJson.GeoPoint> points) { }
public GeoPointCollection(System.Collections.Generic.IEnumerable<Azure.Core.GeoJson.GeoPoint> points, Azure.Core.GeoJson.GeoBoundingBox? boundingBox, System.Collections.Generic.IReadOnlyDictionary<string, object?> customProperties) { }
public Azure.Core.GeoJson.GeoArray<Azure.Core.GeoJson.GeoPosition> Coordinates { get { throw null; } }
public int Count { get { throw null; } }
public Azure.Core.GeoJson.GeoPoint this[int index] { get { throw null; } }
public override Azure.Core.GeoJson.GeoObjectType Type { get { throw null; } }
public System.Collections.Generic.IEnumerator<Azure.Core.GeoJson.GeoPoint> GetEnumerator() { throw null; }
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; }
}
public sealed partial class GeoPolygon : Azure.Core.GeoJson.GeoObject
{
public GeoPolygon(System.Collections.Generic.IEnumerable<Azure.Core.GeoJson.GeoLinearRing> rings) { }
public GeoPolygon(System.Collections.Generic.IEnumerable<Azure.Core.GeoJson.GeoLinearRing> rings, Azure.Core.GeoJson.GeoBoundingBox? boundingBox, System.Collections.Generic.IReadOnlyDictionary<string, object?> customProperties) { }
public GeoPolygon(System.Collections.Generic.IEnumerable<Azure.Core.GeoJson.GeoPosition> positions) { }
public Azure.Core.GeoJson.GeoArray<Azure.Core.GeoJson.GeoArray<Azure.Core.GeoJson.GeoPosition>> Coordinates { get { throw null; } }
public Azure.Core.GeoJson.GeoLinearRing OuterRing { get { throw null; } }
public System.Collections.Generic.IReadOnlyList<Azure.Core.GeoJson.GeoLinearRing> Rings { get { throw null; } }
public override Azure.Core.GeoJson.GeoObjectType Type { get { throw null; } }
}
public sealed partial class GeoPolygonCollection : Azure.Core.GeoJson.GeoObject, System.Collections.Generic.IEnumerable<Azure.Core.GeoJson.GeoPolygon>, System.Collections.Generic.IReadOnlyCollection<Azure.Core.GeoJson.GeoPolygon>, System.Collections.Generic.IReadOnlyList<Azure.Core.GeoJson.GeoPolygon>, System.Collections.IEnumerable
{
public GeoPolygonCollection(System.Collections.Generic.IEnumerable<Azure.Core.GeoJson.GeoPolygon> polygons) { }
public GeoPolygonCollection(System.Collections.Generic.IEnumerable<Azure.Core.GeoJson.GeoPolygon> polygons, Azure.Core.GeoJson.GeoBoundingBox? boundingBox, System.Collections.Generic.IReadOnlyDictionary<string, object?> customProperties) { }
public Azure.Core.GeoJson.GeoArray<Azure.Core.GeoJson.GeoArray<Azure.Core.GeoJson.GeoArray<Azure.Core.GeoJson.GeoPosition>>> Coordinates { get { throw null; } }
public int Count { get { throw null; } }
public Azure.Core.GeoJson.GeoPolygon this[int index] { get { throw null; } }
public override Azure.Core.GeoJson.GeoObjectType Type { get { throw null; } }
public System.Collections.Generic.IEnumerator<Azure.Core.GeoJson.GeoPolygon> GetEnumerator() { throw null; }
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; }
}
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
public readonly partial struct GeoPosition : System.IEquatable<Azure.Core.GeoJson.GeoPosition>
{
private readonly int _dummyPrimitive;
public GeoPosition(double longitude, double latitude) { throw null; }
public GeoPosition(double longitude, double latitude, double? altitude) { throw null; }
public double? Altitude { get { throw null; } }
public int Count { get { throw null; } }
public double this[int index] { get { throw null; } }
public double Latitude { get { throw null; } }
public double Longitude { get { throw null; } }
public bool Equals(Azure.Core.GeoJson.GeoPosition other) { throw null; }
public override bool Equals(object? obj) { throw null; }
public override int GetHashCode() { throw null; }
public static bool operator ==(Azure.Core.GeoJson.GeoPosition left, Azure.Core.GeoJson.GeoPosition right) { throw null; }
public static bool operator !=(Azure.Core.GeoJson.GeoPosition left, Azure.Core.GeoJson.GeoPosition right) { throw null; }
public override string ToString() { throw null; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Azure.Core" />
<ProjectReference Include="..\..\Azure.Core\src\Azure.Core.csproj" />
<PackageReference Include="Microsoft.CSharp" />
</ItemGroup>

Expand All @@ -20,4 +20,5 @@
<Compile Include="$(AzureCoreSharedSources)TaskExtensions.cs" />
<Compile Include="$(AzureCoreSharedSources)NullableAttributes.cs" />
</ItemGroup>

</Project>
17 changes: 0 additions & 17 deletions sdk/core/Azure.Core.Experimental/src/GeoJson/GeoObjectType.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using System.Collections.Generic;
using System.Text.Json;
using Azure.Core.GeoJson;
using Azure.GeoJson;
using NUnit.Framework;

namespace Azure.Core.Tests
Expand Down
35 changes: 19 additions & 16 deletions sdk/core/Azure.Core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@

## 1.15.0-beta.1 (Unreleased)

### Features Added

- Types to represent `GeoJson` primitives.

## 1.14.0 (2021-05-11)

### Added
### Features Added

- Added additional methods to `BearerTokenAuthenticationPolicy`, which enables creation of authentication policies that can handle challenges.

Expand All @@ -18,13 +21,13 @@

## 1.12.0 (2021-04-06)

### Added
### Features Added

- Added `HttpPipeline.CreateHttpMessagePropertiesScope` that can be used to inject scoped properties into `HttpMessage`.

## 1.11.0 (2021-03-22)

### Added
### Features Added

- `Operation` base class for operations that do not return a value.
- Added `Content` property to `Response` which returns the body of the response as a `BinaryData` if the body is buffered.
Expand All @@ -38,13 +41,13 @@

## 1.10.0 (2021-03-09)

## Added
## Features Added

- Added `CloudEvent` type based on the [CloudEvent spec](https://github.com/cloudevents/spec/blob/master/spec.md).

## 1.9.0 (2021-02-09)

## Added
## Features Added
- Added Serialize overloads on `ObjectSerializer` that serialize to `BinaryData`.
- Added AzureCoreExtensions containing extensions methods for `BinaryData` that allow deserializing with an `ObjectSerializer`.

Expand All @@ -61,7 +64,7 @@

## 1.8.0 (2021-01-06)

### Added
### Features Added
- `AzureSasCredential` and its respective policy.

### Key Bug Fixes
Expand All @@ -78,11 +81,11 @@

## 1.6.0 (2020-10-28)

### Added
### Features Added
- The `HttpClientTransport(HttpMessageHandler)` constructor overload.
- The `JsonPatchDocument` type.

### Fixed
### Key Bugs Fixed
- The race condition in `AzureEventSourceListener` class that sometimes resulted in a `NullReferenceException` in the `EventSource`.
- The overflow exception when content length is larger than `int.MaxValue`.

Expand All @@ -97,7 +100,7 @@
### Changed
- `ETag` now supports weak ETags and implements an overload for `ToString` that accepts a format string.

### Added
### Features Added
- HttpWebRequest-based transport implementation. Enabled by-default on .NET Framework. Can be disabled using `AZURE_CORE_DISABLE_HTTPWEBREQUESTTRANSPORT` environment variable or `Azure.Core.Pipeline.DisableHttpWebRequestTransport` AppContext switch. To use the app context switch add the following snippet to your `.csproj`:

```xml
Expand All @@ -110,40 +113,40 @@ When the environment variable or the switch are set the `HttpClientTransport` wo

## 1.4.1 (2020-08-18)

### Fixed
### Key Bugs Fixed
- Bug in TaskExtensions.EnsureCompleted method that causes it to unconditionally throw an exception in the environments with synchronization context

## 1.4.0 (2020-08-06)

### Added
### Features Added
- Added `ObjectSerializer` base class for serialization.
- Added `IMemberNameConverter` for converting member names to serialized property names.
- Added `JsonObjectSerializer` that implements `ObjectSerializer` for `System.Text.Json`.

### Fixed
### Key Bugs Fixed
- Connection leak for retried non-buffered requests on .NET Framework.

## 1.3.0 (2020-07-02)

### Added
### Features Added
- `HttpPipeline.CreateClientRequestIdScope` method to allow setting client request id on outgoing requests.

## 1.2.2 (2020-06-04)

### Bugfix
### Key Bugs Fixed
- Retry server timeouts on .NET Framework.

## 1.2.1 (2020-04-30)

### Changed
- Read client request ID value used for logging and tracing off the initial request object if available.

### Bugfix
### Key Bugs Fixed
- Fixed a bug when using Azure.Core based libraries in Blazor WebAssembly apps.

## 1.2.0 (2020-04-03)

### Added
### Features Added
- `AzureKeyCredential` and its respective policy.

### Changed
Expand Down
Loading