Skip to content

Commit 7c6dc06

Browse files
Copilotpetesramek
andauthored
feat: add docs-versioning template with URL-based version switcher
- Add docs-versioning/layout/_master.tmpl: overrides modern navbar to inject a <select id="version-picker"> in every page's header - Add docs-versioning/public/version-switcher.js: fetches versions.json, detects current version from URL path (e.g. /1.0/...), marks it as selected, and navigates to the same relative path in the chosen version - Add versions.json manifest: latest=1.1, versions=[1.0, 1.1] - Update api-reference.json: add docs-versioning template, copy versions.json - Update toc.yml: add v1.1 (latest) entry, v1.0 entry below it Agent-Logs-Url: https://github.com/petesramek/polyline-algorithm-csharp/sessions/79b105b3-5f4f-495a-a983-d98ce11ba1de Co-authored-by: petesramek <2333452+petesramek@users.noreply.github.com>
1 parent 4fa30ca commit 7c6dc06

276 files changed

Lines changed: 12817 additions & 2 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

api-reference/_docs/1.0/PolylineAlgorithm.Abstraction.AbstractPolylineDecoder-2.html

Lines changed: 292 additions & 0 deletions
Large diffs are not rendered by default.

api-reference/_docs/1.0/PolylineAlgorithm.Abstraction.AbstractPolylineEncoder-2.html

Lines changed: 282 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<title>Interface IPolylineDecoder&lt;TPolyline, TValue&gt; | PolylineAlgorithm for .NET </title>
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<meta name="title" content="Interface IPolylineDecoder&lt;TPolyline, TValue&gt; | PolylineAlgorithm for .NET ">
8+
9+
<meta name="description" content="Defines a contract for decoding an encoded polyline into a sequence of geographic coordinates.">
10+
<link rel="icon" href="../favicon.ico">
11+
<link rel="stylesheet" href="../public/docfx.min.css">
12+
<link rel="stylesheet" href="../public/main.css">
13+
<meta name="docfx:navrel" content="../toc.html">
14+
<meta name="docfx:tocrel" content="toc.html">
15+
16+
<meta name="docfx:rel" content="../">
17+
18+
19+
20+
<meta name="loc:inThisArticle" content="In this article">
21+
<meta name="loc:searchResultsCount" content="{count} results for &quot;{query}&quot;">
22+
<meta name="loc:searchNoResults" content="No results for &quot;{query}&quot;">
23+
<meta name="loc:tocFilter" content="Filter by title">
24+
<meta name="loc:nextArticle" content="Next">
25+
<meta name="loc:prevArticle" content="Previous">
26+
<meta name="loc:themeLight" content="Light">
27+
<meta name="loc:themeDark" content="Dark">
28+
<meta name="loc:themeAuto" content="Auto">
29+
<meta name="loc:changeTheme" content="Change theme">
30+
<meta name="loc:copy" content="Copy">
31+
<meta name="loc:downloadPdf" content="Download PDF">
32+
33+
<script type="module" src="./../public/docfx.min.js"></script>
34+
35+
<script>
36+
const theme = localStorage.getItem('theme') || 'auto'
37+
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
38+
</script>
39+
40+
</head>
41+
42+
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ApiPage">
43+
<header class="bg-body border-bottom">
44+
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
45+
<div class="container-xxl flex-nowrap">
46+
<a class="navbar-brand" href="../index.html">
47+
<img id="logo" class="svg" src="../logo.svg" alt="PolylineAlgorithm for .NET">
48+
PolylineAlgorithm for .NET
49+
</a>
50+
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
51+
<i class="bi bi-three-dots"></i>
52+
</button>
53+
<div class="collapse navbar-collapse" id="navpanel">
54+
<div id="navbar">
55+
<form class="search" role="search" id="search">
56+
<i class="bi bi-search"></i>
57+
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
58+
</form>
59+
</div>
60+
<div id="version-picker-container" class="ms-auto d-flex align-items-center px-2">
61+
<select id="version-picker" class="form-select form-select-sm" style="width:auto" aria-label="Select version"></select>
62+
</div>
63+
</div>
64+
</div>
65+
</nav>
66+
</header>
67+
68+
<main class="container-xxl">
69+
<div class="toc-offcanvas">
70+
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
71+
<div class="offcanvas-header">
72+
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
73+
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
74+
</div>
75+
<div class="offcanvas-body">
76+
<nav class="toc" id="toc"></nav>
77+
</div>
78+
</div>
79+
</div>
80+
81+
<div class="content">
82+
<div class="actionbar">
83+
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
84+
<i class="bi bi-list"></i>
85+
</button>
86+
87+
<nav id="breadcrumb"></nav>
88+
</div>
89+
90+
<article data-uid="">
91+
<h1 class='section api' data-uid='PolylineAlgorithm.Abstraction.IPolylineDecoder`2' data-commentid='T:PolylineAlgorithm.Abstraction.IPolylineDecoder`2' id='PolylineAlgorithm_Abstraction_IPolylineDecoder_2'>Interface IPolylineDecoder&lt;TPolyline, TValue&gt; <a class='header-action link-secondary' title='View source' href='https://github.com/petesramek/polyline-algorithm-csharp/blob/develop/1.0/src/PolylineAlgorithm/Abstraction/IPolylineDecoder.cs#L22'><i class='bi bi-code-slash'></i></a></h1>
92+
<div class="facts text-secondary">
93+
<dl><dt>Namespace</dt><dd><a href='PolylineAlgorithm.Abstraction.html'>PolylineAlgorithm.Abstraction</a></dd></dl><dl><dt>Assembly</dt><dd>PolylineAlgorithm.dll</dd></dl>
94+
</div><p>Defines a contract for decoding an encoded polyline into a sequence of geographic coordinates.</p>
95+
<pre><code class='lang-csharp'>public interface IPolylineDecoder&lt;TPolyline, out TValue&gt;</code></pre><h4 class='section'>Type Parameters</h4><dl class='parameters'><dt><code>TPolyline</code> </dt>
96+
<dd>
97+
98+
99+
<p>The type that represents the encoded polyline input. Common implementations use <span class="xref">System.String</span>,
100+
but custom wrapper types are allowed to carry additional metadata.</p>
101+
102+
</dd><dt><code>TValue</code> </dt>
103+
<dd>
104+
105+
106+
<p>The coordinate type returned by the decoder. Typical implementations return a struct or class that
107+
contains latitude and longitude (for example a <code>LatLng</code> type or a <code>ValueTuple&lt;double,double&gt;</code>).</p>
108+
109+
</dd></dl><h2 class='section'>Methods</h2><h3 class='section api' data-uid='PolylineAlgorithm.Abstraction.IPolylineDecoder`2.Decode(`0,System.Threading.CancellationToken)' data-commentid='M:PolylineAlgorithm.Abstraction.IPolylineDecoder`2.Decode(`0,System.Threading.CancellationToken)' id='PolylineAlgorithm_Abstraction_IPolylineDecoder_2_Decode__0_System_Threading_CancellationToken_'>Decode(TPolyline, CancellationToken) <a class='header-action link-secondary' title='View source' href='https://github.com/petesramek/polyline-algorithm-csharp/blob/develop/1.0/src/PolylineAlgorithm/Abstraction/IPolylineDecoder.cs#L48'><i class='bi bi-code-slash'></i></a></h3>
110+
<p>Decodes the specified encoded polyline into an ordered sequence of geographic coordinates.
111+
The sequence preserves the original vertex order encoded by the <code class="paramref">polyline</code>.</p>
112+
<pre><code class='lang-csharp'>IEnumerable&lt;out TValue&gt; Decode(TPolyline polyline, CancellationToken cancellationToken = default)</code></pre><h4 class='section'>Parameters</h4><dl class='parameters'><dt><code>polyline</code> TPolyline </dt>
113+
<dd>
114+
115+
116+
<p>The <code class="typeparamref">TPolyline</code> instance containing the encoded polyline to decode.
117+
Implementations SHOULD validate the input and may throw <span class="xref">System.ArgumentException</span>
118+
or <span class="xref">System.FormatException</span> for invalid formats.</p>
119+
120+
</dd><dt><code>cancellationToken</code> <a href='https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken'>CancellationToken</a> </dt>
121+
<dd>
122+
123+
124+
<p>A <span class="xref">System.Threading.CancellationToken</span> to observe while decoding. If cancellation is requested,
125+
implementations SHOULD stop work and throw an <span class="xref">System.OperationCanceledException</span>.</p>
126+
127+
</dd></dl><h4 class='section'>Returns</h4><dl class='parameters'><dt> <a href='https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1'>IEnumerable</a>&lt;TValue&gt; </dt>
128+
<dd>
129+
130+
131+
<p>An <span class="xref">System.Collections.Generic.IEnumerable`1</span> of <code class="typeparamref">TValue</code> representing the decoded
132+
latitude/longitude pairs (or equivalent coordinates) in the same order they were encoded.</p>
133+
134+
</dd></dl><h4 class='section'>Remarks</h4><p>Implementations commonly follow the Google Encoded Polyline Algorithm Format, but this interface
135+
does not mandate a specific encoding. Consumers should rely on a concrete decoder's documentation
136+
to understand the exact encoding supported.</p>
137+
<h4 class='section'>Exceptions</h4><dl class='parameters'><dt> <a href='https://learn.microsoft.com/dotnet/api/system.operationcanceledexception'>OperationCanceledException</a> </dt>
138+
<dd>
139+
140+
141+
<p>Thrown when the provided <code class="paramref">cancellationToken</code> requests cancellation.</p>
142+
143+
</dd></dl>
144+
</article>
145+
146+
<div class="contribution d-print-none">
147+
</div>
148+
149+
150+
</div>
151+
152+
<div class="affix">
153+
<nav id="affix"></nav>
154+
</div>
155+
</main>
156+
157+
<div class="container-xxl search-results" id="search-results"></div>
158+
159+
<footer class="border-top text-secondary">
160+
<div class="container-xxl">
161+
<div class="flex-fill">
162+
<span>Made with <a href="https://dotnet.github.io/docfx">docfx</a></span>
163+
</div>
164+
</div>
165+
</footer>
166+
<script src="./../public/version-switcher.js"></script>
167+
</body>
168+
</html>

0 commit comments

Comments
 (0)