-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathPolylineAlgorithm.Abstraction.AbstractPolylineDecoder-2.yml
More file actions
233 lines (231 loc) · 12.9 KB
/
PolylineAlgorithm.Abstraction.AbstractPolylineDecoder-2.yml
File metadata and controls
233 lines (231 loc) · 12.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
### YamlMime:ApiPage
title: Class AbstractPolylineDecoder<TPolyline, TCoordinate>
body:
- api1: Class AbstractPolylineDecoder<TPolyline, TCoordinate>
id: PolylineAlgorithm_Abstraction_AbstractPolylineDecoder_2
src: https://github.com/petesramek/polyline-algorithm-csharp/blob/bugfix/incorrect-normalization/src/PolylineAlgorithm/Abstraction/AbstractPolylineDecoder.cs#L22
metadata:
uid: PolylineAlgorithm.Abstraction.AbstractPolylineDecoder`2
commentId: T:PolylineAlgorithm.Abstraction.AbstractPolylineDecoder`2
- facts:
- name: Namespace
value:
text: PolylineAlgorithm.Abstraction
url: PolylineAlgorithm.Abstraction.html
- name: Assembly
value: PolylineAlgorithm.dll
- markdown: Provides a base implementation for decoding encoded polyline strings into sequences of geographic coordinates.
- code: 'public abstract class AbstractPolylineDecoder<TPolyline, TCoordinate> : IPolylineDecoder<TPolyline, TCoordinate>'
- h4: Type Parameters
- parameters:
- name: TPolyline
description: The type that represents the encoded polyline input.
- name: TCoordinate
description: The type that represents a decoded geographic coordinate.
- h4: Inheritance
- inheritance:
- text: object
url: https://learn.microsoft.com/dotnet/api/system.object
- text: AbstractPolylineDecoder<TPolyline, TCoordinate>
url: PolylineAlgorithm.Abstraction.AbstractPolylineDecoder-2.html
- h4: Implements
- list:
- text: IPolylineDecoder<TPolyline, TCoordinate>
url: PolylineAlgorithm.Abstraction.IPolylineDecoder-2.html
- h4: Inherited Members
- list:
- text: object.Equals(object)
url: https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)
- text: object.Equals(object, object)
url: https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)
- text: object.GetHashCode()
url: https://learn.microsoft.com/dotnet/api/system.object.gethashcode
- text: object.GetType()
url: https://learn.microsoft.com/dotnet/api/system.object.gettype
- text: object.MemberwiseClone()
url: https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone
- text: object.ReferenceEquals(object, object)
url: https://learn.microsoft.com/dotnet/api/system.object.referenceequals
- text: object.ToString()
url: https://learn.microsoft.com/dotnet/api/system.object.tostring
- h2: Remarks
- markdown: >-
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>
and <xref href="PolylineAlgorithm.Abstraction.AbstractPolylineDecoder%602.CreateCoordinate(System.Double%2cSystem.Double)" data-throw-if-not-resolved="false"></xref> to provide type-specific behavior.
- h2: Constructors
- api3: AbstractPolylineDecoder()
id: PolylineAlgorithm_Abstraction_AbstractPolylineDecoder_2__ctor
src: https://github.com/petesramek/polyline-algorithm-csharp/blob/bugfix/incorrect-normalization/src/PolylineAlgorithm/Abstraction/AbstractPolylineDecoder.cs#L28
metadata:
uid: PolylineAlgorithm.Abstraction.AbstractPolylineDecoder`2.#ctor
commentId: M:PolylineAlgorithm.Abstraction.AbstractPolylineDecoder`2.#ctor
- 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.
- code: protected AbstractPolylineDecoder()
- api3: AbstractPolylineDecoder(PolylineEncodingOptions)
id: PolylineAlgorithm_Abstraction_AbstractPolylineDecoder_2__ctor_PolylineAlgorithm_PolylineEncodingOptions_
src: https://github.com/petesramek/polyline-algorithm-csharp/blob/bugfix/incorrect-normalization/src/PolylineAlgorithm/Abstraction/AbstractPolylineDecoder.cs#L40
metadata:
uid: PolylineAlgorithm.Abstraction.AbstractPolylineDecoder`2.#ctor(PolylineAlgorithm.PolylineEncodingOptions)
commentId: M:PolylineAlgorithm.Abstraction.AbstractPolylineDecoder`2.#ctor(PolylineAlgorithm.PolylineEncodingOptions)
- markdown: Initializes a new instance of the <xref href="PolylineAlgorithm.Abstraction.AbstractPolylineDecoder%602" data-throw-if-not-resolved="false"></xref> class with the specified encoding options.
- code: protected AbstractPolylineDecoder(PolylineEncodingOptions options)
- h4: Parameters
- parameters:
- name: options
type:
- text: PolylineEncodingOptions
url: PolylineAlgorithm.PolylineEncodingOptions.html
description: The <xref href="PolylineAlgorithm.PolylineEncodingOptions" data-throw-if-not-resolved="false"></xref> to use for encoding operations.
- h4: Exceptions
- parameters:
- type:
- text: ArgumentNullException
url: https://learn.microsoft.com/dotnet/api/system.argumentnullexception
description: Thrown when <code class="paramref">options</code> is <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null">null</a>.
- h2: Properties
- api3: Options
id: PolylineAlgorithm_Abstraction_AbstractPolylineDecoder_2_Options
src: https://github.com/petesramek/polyline-algorithm-csharp/blob/bugfix/incorrect-normalization/src/PolylineAlgorithm/Abstraction/AbstractPolylineDecoder.cs#L54
metadata:
uid: PolylineAlgorithm.Abstraction.AbstractPolylineDecoder`2.Options
commentId: P:PolylineAlgorithm.Abstraction.AbstractPolylineDecoder`2.Options
- markdown: Gets the encoding options used by this polyline decoder.
- code: public PolylineEncodingOptions Options { get; }
- h4: Property Value
- parameters:
- type:
- text: PolylineEncodingOptions
url: PolylineAlgorithm.PolylineEncodingOptions.html
- h2: Methods
- api3: CreateCoordinate(double, double)
id: PolylineAlgorithm_Abstraction_AbstractPolylineDecoder_2_CreateCoordinate_System_Double_System_Double_
src: https://github.com/petesramek/polyline-algorithm-csharp/blob/bugfix/incorrect-normalization/src/PolylineAlgorithm/Abstraction/AbstractPolylineDecoder.cs#L202
metadata:
uid: PolylineAlgorithm.Abstraction.AbstractPolylineDecoder`2.CreateCoordinate(System.Double,System.Double)
commentId: M:PolylineAlgorithm.Abstraction.AbstractPolylineDecoder`2.CreateCoordinate(System.Double,System.Double)
- markdown: Creates a <code class="typeparamref">TCoordinate</code> instance from the specified latitude and longitude values.
- code: protected abstract TCoordinate CreateCoordinate(double latitude, double longitude)
- h4: Parameters
- parameters:
- name: latitude
type:
- text: double
url: https://learn.microsoft.com/dotnet/api/system.double
description: The latitude component of the coordinate, in degrees.
- name: longitude
type:
- text: double
url: https://learn.microsoft.com/dotnet/api/system.double
description: The longitude component of the coordinate, in degrees.
- h4: Returns
- parameters:
- type:
- TCoordinate
description: A <code class="typeparamref">TCoordinate</code> instance representing the specified geographic coordinate.
- api3: Decode(TPolyline, CancellationToken)
id: PolylineAlgorithm_Abstraction_AbstractPolylineDecoder_2_Decode__0_System_Threading_CancellationToken_
src: https://github.com/petesramek/polyline-algorithm-csharp/blob/bugfix/incorrect-normalization/src/PolylineAlgorithm/Abstraction/AbstractPolylineDecoder.cs#L81
metadata:
uid: PolylineAlgorithm.Abstraction.AbstractPolylineDecoder`2.Decode(`0,System.Threading.CancellationToken)
commentId: M:PolylineAlgorithm.Abstraction.AbstractPolylineDecoder`2.Decode(`0,System.Threading.CancellationToken)
- markdown: >-
Decodes an encoded <code class="typeparamref">TPolyline</code> into a sequence of <code class="typeparamref">TCoordinate</code> instances,
with support for cancellation.
- code: public IEnumerable<TCoordinate> Decode(TPolyline polyline, CancellationToken cancellationToken = default)
- h4: Parameters
- parameters:
- name: polyline
type:
- TPolyline
description: The <code class="typeparamref">TPolyline</code> instance containing the encoded polyline string to decode.
- name: cancellationToken
type:
- text: CancellationToken
url: https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken
description: A <xref href="System.Threading.CancellationToken" data-throw-if-not-resolved="false"></xref> that can be used to cancel the decoding operation.
optional: true
- h4: Returns
- parameters:
- type:
- text: IEnumerable
url: https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1
- <
- TCoordinate
- '>'
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.
- h4: Exceptions
- parameters:
- type:
- text: ArgumentNullException
url: https://learn.microsoft.com/dotnet/api/system.argumentnullexception
description: Thrown when <code class="paramref">polyline</code> is <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null">null</a>.
- type:
- text: ArgumentException
url: https://learn.microsoft.com/dotnet/api/system.argumentexception
description: Thrown when <code class="paramref">polyline</code> is empty.
- type:
- text: InvalidPolylineException
url: PolylineAlgorithm.InvalidPolylineException.html
description: Thrown when the polyline format is invalid or malformed at a specific position.
- type:
- text: OperationCanceledException
url: https://learn.microsoft.com/dotnet/api/system.operationcanceledexception
description: Thrown when <code class="paramref">cancellationToken</code> is canceled during decoding.
- api3: GetReadOnlyMemory(in TPolyline)
id: PolylineAlgorithm_Abstraction_AbstractPolylineDecoder_2_GetReadOnlyMemory__0__
src: https://github.com/petesramek/polyline-algorithm-csharp/blob/bugfix/incorrect-normalization/src/PolylineAlgorithm/Abstraction/AbstractPolylineDecoder.cs#L187
metadata:
uid: PolylineAlgorithm.Abstraction.AbstractPolylineDecoder`2.GetReadOnlyMemory(`0@)
commentId: M:PolylineAlgorithm.Abstraction.AbstractPolylineDecoder`2.GetReadOnlyMemory(`0@)
- markdown: Extracts the underlying read-only memory region of characters from the specified polyline instance.
- code: protected abstract ReadOnlyMemory<char> GetReadOnlyMemory(in TPolyline polyline)
- h4: Parameters
- parameters:
- name: polyline
type:
- TPolyline
description: The <code class="typeparamref">TPolyline</code> instance from which to extract the character sequence.
- h4: Returns
- parameters:
- type:
- text: ReadOnlyMemory
url: https://learn.microsoft.com/dotnet/api/system.readonlymemory-1
- <
- text: char
url: https://learn.microsoft.com/dotnet/api/system.char
- '>'
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.
- api3: ValidateFormat(ReadOnlyMemory<char>, ILogger?)
id: PolylineAlgorithm_Abstraction_AbstractPolylineDecoder_2_ValidateFormat_System_ReadOnlyMemory_System_Char__Microsoft_Extensions_Logging_ILogger_
src: https://github.com/petesramek/polyline-algorithm-csharp/blob/bugfix/incorrect-normalization/src/PolylineAlgorithm/Abstraction/AbstractPolylineDecoder.cs#L167
metadata:
uid: PolylineAlgorithm.Abstraction.AbstractPolylineDecoder`2.ValidateFormat(System.ReadOnlyMemory{System.Char},Microsoft.Extensions.Logging.ILogger)
commentId: M:PolylineAlgorithm.Abstraction.AbstractPolylineDecoder`2.ValidateFormat(System.ReadOnlyMemory{System.Char},Microsoft.Extensions.Logging.ILogger)
- markdown: Validates the format of the polyline character sequence, ensuring all characters are within the allowed range.
- code: protected virtual void ValidateFormat(ReadOnlyMemory<char> sequence, ILogger? logger)
- h4: Parameters
- parameters:
- name: sequence
type:
- text: ReadOnlyMemory
url: https://learn.microsoft.com/dotnet/api/system.readonlymemory-1
- <
- text: char
url: https://learn.microsoft.com/dotnet/api/system.char
- '>'
description: The read-only memory region of characters representing the polyline to validate.
- name: logger
type:
- text: ILogger
url: https://learn.microsoft.com/dotnet/api/microsoft.extensions.logging.ilogger
- '?'
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.
- h4: Exceptions
- parameters:
- type:
- text: ArgumentException
url: https://learn.microsoft.com/dotnet/api/system.argumentexception
description: Thrown when the polyline contains characters outside the valid encoding range or has an invalid block structure.
languageId: csharp
metadata:
description: Provides a base implementation for decoding encoded polyline strings into sequences of geographic coordinates.