-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathPolylineAlgorithm.Abstraction.IPolylineDecoder-2.yml
More file actions
90 lines (81 loc) · 4.31 KB
/
PolylineAlgorithm.Abstraction.IPolylineDecoder-2.yml
File metadata and controls
90 lines (81 loc) · 4.31 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
### YamlMime:ApiPage
title: Interface IPolylineDecoder<TPolyline, TValue>
body:
- api1: Interface IPolylineDecoder<TPolyline, TValue>
id: PolylineAlgorithm_Abstraction_IPolylineDecoder_2
src: https://github.com/petesramek/polyline-algorithm-csharp/blob/copilot/review-github-templates/src/PolylineAlgorithm/Abstraction/IPolylineDecoder.cs#L22
metadata:
uid: PolylineAlgorithm.Abstraction.IPolylineDecoder`2
commentId: T:PolylineAlgorithm.Abstraction.IPolylineDecoder`2
- facts:
- name: Namespace
value:
text: PolylineAlgorithm.Abstraction
url: PolylineAlgorithm.Abstraction.html
- name: Assembly
value: PolylineAlgorithm.dll
- markdown: Defines a contract for decoding an encoded polyline into a sequence of geographic coordinates.
- code: public interface IPolylineDecoder<TPolyline, out TValue>
- h4: Type Parameters
- parameters:
- name: TPolyline
description: >-
The type that represents the encoded polyline input. Common implementations use <xref href="System.String" data-throw-if-not-resolved="false"></xref>,
but custom wrapper types are allowed to carry additional metadata.
- name: TValue
description: >-
The coordinate type returned by the decoder. Typical implementations return a struct or class that
contains latitude and longitude (for example a <code>LatLng</code> type or a <code>ValueTuple<double,double></code>).
- h2: Methods
- api3: Decode(TPolyline, CancellationToken)
id: PolylineAlgorithm_Abstraction_IPolylineDecoder_2_Decode__0_System_Threading_CancellationToken_
src: https://github.com/petesramek/polyline-algorithm-csharp/blob/copilot/review-github-templates/src/PolylineAlgorithm/Abstraction/IPolylineDecoder.cs#L48
metadata:
uid: PolylineAlgorithm.Abstraction.IPolylineDecoder`2.Decode(`0,System.Threading.CancellationToken)
commentId: M:PolylineAlgorithm.Abstraction.IPolylineDecoder`2.Decode(`0,System.Threading.CancellationToken)
- markdown: >-
Decodes the specified encoded polyline into an ordered sequence of geographic coordinates.
The sequence preserves the original vertex order encoded by the <code class="paramref">polyline</code>.
- code: IEnumerable<out TValue> 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 to decode.
Implementations SHOULD validate the input and may throw <xref href="System.ArgumentException" data-throw-if-not-resolved="false"></xref>
or <xref href="System.FormatException" data-throw-if-not-resolved="false"></xref> for invalid formats.
- 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> to observe while decoding. If cancellation is requested,
implementations SHOULD stop work and throw an <xref href="System.OperationCanceledException" data-throw-if-not-resolved="false"></xref>.
optional: true
- h4: Returns
- parameters:
- type:
- text: IEnumerable
url: https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1
- <
- TValue
- '>'
description: >-
An <xref href="System.Collections.Generic.IEnumerable%601" data-throw-if-not-resolved="false"></xref> of <code class="typeparamref">TValue</code> representing the decoded
latitude/longitude pairs (or equivalent coordinates) in the same order they were encoded.
- h4: Remarks
- markdown: >-
Implementations commonly follow the Google Encoded Polyline Algorithm Format, but this interface
does not mandate a specific encoding. Consumers should rely on a concrete decoder's documentation
to understand the exact encoding supported.
- h4: Exceptions
- parameters:
- type:
- text: OperationCanceledException
url: https://learn.microsoft.com/dotnet/api/system.operationcanceledexception
description: Thrown when the provided <code class="paramref">cancellationToken</code> requests cancellation.
languageId: csharp
metadata:
description: Defines a contract for decoding an encoded polyline into a sequence of geographic coordinates.