Skip to content

Commit 44cb406

Browse files
committed
Updated docs for version 1.0
1 parent 7d7ab01 commit 44cb406

10 files changed

Lines changed: 113 additions & 104 deletions

api-reference/1.0/PolylineAlgorithm.Abstraction.AbstractPolylineDecoder-2.yml

Lines changed: 48 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Class AbstractPolylineDecoder<TPolyline, TCoordinate>
33
body:
44
- api1: Class AbstractPolylineDecoder<TPolyline, TCoordinate>
55
id: PolylineAlgorithm_Abstraction_AbstractPolylineDecoder_2
6-
src: https://github.com/petesramek/polyline-algorithm-csharp/blob/develop/1.0/src/PolylineAlgorithm/Abstraction/AbstractPolylineDecoder.cs#L21
6+
src: https://github.com/petesramek/polyline-algorithm-csharp/blob/develop/1.0/src/PolylineAlgorithm/Abstraction/AbstractPolylineDecoder.cs#L23
77
metadata:
88
uid: PolylineAlgorithm.Abstraction.AbstractPolylineDecoder`2
99
commentId: T:PolylineAlgorithm.Abstraction.AbstractPolylineDecoder`2
@@ -14,15 +14,14 @@ body:
1414
url: PolylineAlgorithm.Abstraction.html
1515
- name: Assembly
1616
value: PolylineAlgorithm.dll
17-
- markdown: >-
18-
Decodes encoded polyline strings into sequences of geographic coordinates.
19-
20-
Implements the <xref href="PolylineAlgorithm.Abstraction.IPolylineDecoder%602" data-throw-if-not-resolved="false"></xref> interface.
17+
- markdown: Provides a base implementation for decoding encoded polyline strings into sequences of geographic coordinates.
2118
- code: 'public abstract class AbstractPolylineDecoder<TPolyline, TCoordinate> : IPolylineDecoder<TPolyline, TCoordinate>'
2219
- h4: Type Parameters
2320
- parameters:
2421
- name: TPolyline
22+
description: The type that represents the encoded polyline input.
2523
- name: TCoordinate
24+
description: The type that represents a decoded geographic coordinate.
2625
- h4: Inheritance
2726
- inheritance:
2827
- text: object
@@ -50,19 +49,22 @@ body:
5049
- text: object.ToString()
5150
url: https://learn.microsoft.com/dotnet/api/system.object.tostring
5251
- h2: Remarks
53-
- markdown: This abstract class provides a base implementation for decoding polylines, allowing subclasses to define how to handle specific polyline formats.
52+
- markdown: >-
53+
Derive from this class to implement a decoder for a specific polyline type. Override <xref href="PolylineAlgorithm.Abstraction.AbstractPolylineDecoder%602.GetReadOnlyMemory(%600%40)" data-throw-if-not-resolved="false"></xref>
54+
55+
and <xref href="PolylineAlgorithm.Abstraction.AbstractPolylineDecoder%602.CreateCoordinate(System.Double%2cSystem.Double)" data-throw-if-not-resolved="false"></xref> to provide type-specific behavior.
5456
- h2: Constructors
5557
- api3: AbstractPolylineDecoder()
5658
id: PolylineAlgorithm_Abstraction_AbstractPolylineDecoder_2__ctor
57-
src: https://github.com/petesramek/polyline-algorithm-csharp/blob/develop/1.0/src/PolylineAlgorithm/Abstraction/AbstractPolylineDecoder.cs#L27
59+
src: https://github.com/petesramek/polyline-algorithm-csharp/blob/develop/1.0/src/PolylineAlgorithm/Abstraction/AbstractPolylineDecoder.cs#L29
5860
metadata:
5961
uid: PolylineAlgorithm.Abstraction.AbstractPolylineDecoder`2.#ctor
6062
commentId: M:PolylineAlgorithm.Abstraction.AbstractPolylineDecoder`2.#ctor
6163
- markdown: Initializes a new instance of the <xref href="PolylineAlgorithm.Abstraction.AbstractPolylineDecoder%602" data-throw-if-not-resolved="false"></xref> class with default encoding options.
6264
- code: protected AbstractPolylineDecoder()
6365
- api3: AbstractPolylineDecoder(PolylineEncodingOptions)
6466
id: PolylineAlgorithm_Abstraction_AbstractPolylineDecoder_2__ctor_PolylineAlgorithm_PolylineEncodingOptions_
65-
src: https://github.com/petesramek/polyline-algorithm-csharp/blob/develop/1.0/src/PolylineAlgorithm/Abstraction/AbstractPolylineDecoder.cs#L39
67+
src: https://github.com/petesramek/polyline-algorithm-csharp/blob/develop/1.0/src/PolylineAlgorithm/Abstraction/AbstractPolylineDecoder.cs#L41
6668
metadata:
6769
uid: PolylineAlgorithm.Abstraction.AbstractPolylineDecoder`2.#ctor(PolylineAlgorithm.PolylineEncodingOptions)
6870
commentId: M:PolylineAlgorithm.Abstraction.AbstractPolylineDecoder`2.#ctor(PolylineAlgorithm.PolylineEncodingOptions)
@@ -80,11 +82,11 @@ body:
8082
- type:
8183
- text: ArgumentNullException
8284
url: https://learn.microsoft.com/dotnet/api/system.argumentnullexception
83-
description: Thrown when <code class="paramref">options</code> is <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null">null</a>
85+
description: Thrown when <code class="paramref">options</code> is <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null">null</a>.
8486
- h2: Properties
8587
- api3: Options
8688
id: PolylineAlgorithm_Abstraction_AbstractPolylineDecoder_2_Options
87-
src: https://github.com/petesramek/polyline-algorithm-csharp/blob/develop/1.0/src/PolylineAlgorithm/Abstraction/AbstractPolylineDecoder.cs#L53
89+
src: https://github.com/petesramek/polyline-algorithm-csharp/blob/develop/1.0/src/PolylineAlgorithm/Abstraction/AbstractPolylineDecoder.cs#L55
8890
metadata:
8991
uid: PolylineAlgorithm.Abstraction.AbstractPolylineDecoder`2.Options
9092
commentId: P:PolylineAlgorithm.Abstraction.AbstractPolylineDecoder`2.Options
@@ -98,28 +100,32 @@ body:
98100
- h2: Methods
99101
- api3: CreateCoordinate(double, double)
100102
id: PolylineAlgorithm_Abstraction_AbstractPolylineDecoder_2_CreateCoordinate_System_Double_System_Double_
101-
src: https://github.com/petesramek/polyline-algorithm-csharp/blob/develop/1.0/src/PolylineAlgorithm/Abstraction/AbstractPolylineDecoder.cs#L180
103+
src: https://github.com/petesramek/polyline-algorithm-csharp/blob/develop/1.0/src/PolylineAlgorithm/Abstraction/AbstractPolylineDecoder.cs#L224
102104
metadata:
103105
uid: PolylineAlgorithm.Abstraction.AbstractPolylineDecoder`2.CreateCoordinate(System.Double,System.Double)
104106
commentId: M:PolylineAlgorithm.Abstraction.AbstractPolylineDecoder`2.CreateCoordinate(System.Double,System.Double)
107+
- markdown: Creates a <code class="typeparamref">TCoordinate</code> instance from the specified latitude and longitude values.
105108
- code: protected abstract TCoordinate CreateCoordinate(double latitude, double longitude)
106109
- h4: Parameters
107110
- parameters:
108111
- name: latitude
109112
type:
110113
- text: double
111114
url: https://learn.microsoft.com/dotnet/api/system.double
115+
description: The latitude component of the coordinate, in degrees.
112116
- name: longitude
113117
type:
114118
- text: double
115119
url: https://learn.microsoft.com/dotnet/api/system.double
120+
description: The longitude component of the coordinate, in degrees.
116121
- h4: Returns
117122
- parameters:
118123
- type:
119124
- TCoordinate
125+
description: A <code class="typeparamref">TCoordinate</code> instance representing the specified geographic coordinate.
120126
- api3: Decode(TPolyline)
121127
id: PolylineAlgorithm_Abstraction_AbstractPolylineDecoder_2_Decode__0_
122-
src: https://github.com/petesramek/polyline-algorithm-csharp/blob/develop/1.0/src/PolylineAlgorithm/Abstraction/AbstractPolylineDecoder.cs#L73
128+
src: https://github.com/petesramek/polyline-algorithm-csharp/blob/develop/1.0/src/PolylineAlgorithm/Abstraction/AbstractPolylineDecoder.cs#L75
123129
metadata:
124130
uid: PolylineAlgorithm.Abstraction.AbstractPolylineDecoder`2.Decode(`0)
125131
commentId: M:PolylineAlgorithm.Abstraction.AbstractPolylineDecoder`2.Decode(`0)
@@ -156,23 +162,26 @@ body:
156162
description: Thrown when the polyline format is invalid or malformed at a specific position.
157163
- api3: Decode(TPolyline, CancellationToken)
158164
id: PolylineAlgorithm_Abstraction_AbstractPolylineDecoder_2_Decode__0_System_Threading_CancellationToken_
159-
src: https://github.com/petesramek/polyline-algorithm-csharp/blob/develop/1.0/src/PolylineAlgorithm/Abstraction/AbstractPolylineDecoder.cs#L85
165+
src: https://github.com/petesramek/polyline-algorithm-csharp/blob/develop/1.0/src/PolylineAlgorithm/Abstraction/AbstractPolylineDecoder.cs#L103
160166
metadata:
161167
uid: PolylineAlgorithm.Abstraction.AbstractPolylineDecoder`2.Decode(`0,System.Threading.CancellationToken)
162168
commentId: M:PolylineAlgorithm.Abstraction.AbstractPolylineDecoder`2.Decode(`0,System.Threading.CancellationToken)
163-
- markdown: Decodes an encoded polyline with cancellation support.
169+
- markdown: >-
170+
Decodes an encoded <code class="typeparamref">TPolyline</code> into a sequence of <code class="typeparamref">TCoordinate</code> instances,
171+
172+
with support for cancellation.
164173
- code: public IEnumerable<TCoordinate> Decode(TPolyline polyline, CancellationToken cancellationToken)
165174
- h4: Parameters
166175
- parameters:
167176
- name: polyline
168177
type:
169178
- TPolyline
170-
description: The encoded polyline.
179+
description: The <code class="typeparamref">TPolyline</code> instance containing the encoded polyline string to decode.
171180
- name: cancellationToken
172181
type:
173182
- text: CancellationToken
174183
url: https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken
175-
description: Cancellation token.
184+
description: A <xref href="System.Threading.CancellationToken" data-throw-if-not-resolved="false"></xref> that can be used to cancel the decoding operation.
176185
- h4: Returns
177186
- parameters:
178187
- type:
@@ -181,33 +190,39 @@ body:
181190
- <
182191
- TCoordinate
183192
- '>'
184-
description: Decoded coordinates.
193+
description: An <xref href="System.Collections.Generic.IEnumerable%601" data-throw-if-not-resolved="false"></xref> of <code class="typeparamref">TCoordinate</code> representing the decoded latitude and longitude pairs.
185194
- h4: Exceptions
186195
- parameters:
187196
- type:
188197
- text: ArgumentNullException
189198
url: https://learn.microsoft.com/dotnet/api/system.argumentnullexception
190-
description: ''
199+
description: Thrown when <code class="paramref">polyline</code> is <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null">null</a>.
191200
- type:
192201
- text: ArgumentException
193202
url: https://learn.microsoft.com/dotnet/api/system.argumentexception
194-
description: ''
203+
description: Thrown when <code class="paramref">polyline</code> is empty.
195204
- type:
196205
- text: InvalidPolylineException
197206
url: PolylineAlgorithm.Diagnostics.InvalidPolylineException.html
198-
description: ''
207+
description: Thrown when the polyline format is invalid or malformed at a specific position.
208+
- type:
209+
- text: OperationCanceledException
210+
url: https://learn.microsoft.com/dotnet/api/system.operationcanceledexception
211+
description: Thrown when <code class="paramref">cancellationToken</code> is canceled during decoding.
199212
- api3: GetReadOnlyMemory(in TPolyline)
200213
id: PolylineAlgorithm_Abstraction_AbstractPolylineDecoder_2_GetReadOnlyMemory__0__
201-
src: https://github.com/petesramek/polyline-algorithm-csharp/blob/develop/1.0/src/PolylineAlgorithm/Abstraction/AbstractPolylineDecoder.cs#L177
214+
src: https://github.com/petesramek/polyline-algorithm-csharp/blob/develop/1.0/src/PolylineAlgorithm/Abstraction/AbstractPolylineDecoder.cs#L209
202215
metadata:
203216
uid: PolylineAlgorithm.Abstraction.AbstractPolylineDecoder`2.GetReadOnlyMemory(`0@)
204217
commentId: M:PolylineAlgorithm.Abstraction.AbstractPolylineDecoder`2.GetReadOnlyMemory(`0@)
218+
- markdown: Extracts the underlying read-only memory region of characters from the specified polyline instance.
205219
- code: protected abstract ReadOnlyMemory<char> GetReadOnlyMemory(in TPolyline polyline)
206220
- h4: Parameters
207221
- parameters:
208222
- name: polyline
209223
type:
210224
- TPolyline
225+
description: The <code class="typeparamref">TPolyline</code> instance from which to extract the character sequence.
211226
- h4: Returns
212227
- parameters:
213228
- type:
@@ -217,13 +232,14 @@ body:
217232
- text: char
218233
url: https://learn.microsoft.com/dotnet/api/system.char
219234
- '>'
235+
description: A <xref href="System.ReadOnlyMemory%601" data-throw-if-not-resolved="false"></xref> of <xref href="System.Char" data-throw-if-not-resolved="false"></xref> representing the encoded polyline characters.
220236
- api3: ValidateFormat(ReadOnlyMemory<char>, ILogger?)
221237
id: PolylineAlgorithm_Abstraction_AbstractPolylineDecoder_2_ValidateFormat_System_ReadOnlyMemory_System_Char__Microsoft_Extensions_Logging_ILogger_
222-
src: https://github.com/petesramek/polyline-algorithm-csharp/blob/develop/1.0/src/PolylineAlgorithm/Abstraction/AbstractPolylineDecoder.cs#L166
238+
src: https://github.com/petesramek/polyline-algorithm-csharp/blob/develop/1.0/src/PolylineAlgorithm/Abstraction/AbstractPolylineDecoder.cs#L189
223239
metadata:
224240
uid: PolylineAlgorithm.Abstraction.AbstractPolylineDecoder`2.ValidateFormat(System.ReadOnlyMemory{System.Char},Microsoft.Extensions.Logging.ILogger)
225241
commentId: M:PolylineAlgorithm.Abstraction.AbstractPolylineDecoder`2.ValidateFormat(System.ReadOnlyMemory{System.Char},Microsoft.Extensions.Logging.ILogger)
226-
- markdown: Validates the polyline format for allowed characters.
242+
- markdown: Validates the format of the polyline character sequence, ensuring all characters are within the allowed range.
227243
- code: protected virtual void ValidateFormat(ReadOnlyMemory<char> sequence, ILogger? logger)
228244
- h4: Parameters
229245
- parameters:
@@ -235,14 +251,19 @@ body:
235251
- text: char
236252
url: https://learn.microsoft.com/dotnet/api/system.char
237253
- '>'
254+
description: The read-only memory region of characters representing the polyline to validate.
238255
- name: logger
239256
type:
240257
- text: ILogger
241258
url: https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging.ilogger
242259
- '?'
260+
description: An optional <xref href="Microsoft.Extensions.Logging.ILogger" data-throw-if-not-resolved="false"></xref> used to log a warning when format validation fails.
261+
- h4: Exceptions
262+
- parameters:
263+
- type:
264+
- text: ArgumentException
265+
url: https://learn.microsoft.com/dotnet/api/system.argumentexception
266+
description: Thrown when the polyline contains characters outside the valid encoding range or has an invalid block structure.
243267
languageId: csharp
244268
metadata:
245-
description: >-
246-
Decodes encoded polyline strings into sequences of geographic coordinates.
247-
248-
Implements the interface.
269+
description: Provides a base implementation for decoding encoded polyline strings into sequences of geographic coordinates.

0 commit comments

Comments
 (0)