Skip to content

Commit d3d234b

Browse files
Copilotpetesramek
andauthored
fix: grammar, TOC typo, and outdated API references in docs
Agent-Logs-Url: https://github.com/petesramek/polyline-algorithm-csharp/sessions/6bb4cacd-08ac-42d9-825f-139d0b64f725 Co-authored-by: petesramek <2333452+petesramek@users.noreply.github.com>
1 parent 57e024b commit d3d234b

5 files changed

Lines changed: 10 additions & 10 deletions

File tree

api-reference/guide/advanced-scenarios.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ var builder = WebApplication.CreateBuilder(args);
120120

121121
builder.Services.AddMyPolylineEncoderDecoder(
122122
PolylineEncodingOptionsBuilder.Create()
123-
.SetMaxBufferSize(10000)
123+
.WithStackAllocLimit(1024)
124124
.Build()
125125
);
126126

@@ -145,7 +145,7 @@ builder.Services.AddMyPolylineEncoderDecoder(
145145
## Integration Guidance
146146

147147
- **Batch or incremental processing:**
148-
For large datasets, control buffer sizes via `PolylineEncodingOptions`.
148+
For large datasets, control the stack allocation limit via `PolylineEncodingOptions.StackAllocLimit`.
149149
- **Thread safety:**
150150
Default encoders/decoders are stateless and thread-safe. If extending for mutable types, ensure synchronization.
151151
- **Logging:**

api-reference/guide/configuration.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ PolylineAlgorithm offers flexible configuration for encoding and decoding polyli
88

99
Most configuration is handled via the `PolylineEncodingOptions` object, which you can build using the fluent `PolylineEncodingOptionsBuilder`.
1010

11-
### Example: Customizing Buffer Size
11+
### Example: Customizing Stack Alloc Limit
1212

1313
```csharp
1414
using PolylineAlgorithm;
1515

1616
var options = PolylineEncodingOptionsBuilder.Create()
17-
.SetMaxBufferSize(10000) // Set custom buffer size
17+
.WithStackAllocLimit(1024) // Set stack allocation threshold (bytes)
1818
.Build();
1919

2020
var encoder = new PolylineEncoder(options);
@@ -47,7 +47,7 @@ For custom validation (e.g., for custom coordinate types), extend the provided i
4747

4848
When using `PolylineEncodingOptionsBuilder`, you may set:
4949

50-
- **Buffer sizes:** Configure allocation for large or streaming polylines
50+
- **Stack alloc limit:** Configure the threshold below which buffers are stack-allocated vs. rented from `ArrayPool<char>`
5151
- **Logging hooks:** Integrate your logger for troubleshooting/instrumentation
5252
- **(Future)** Custom precision, additional metadata (as needed)
5353

@@ -59,8 +59,8 @@ See the XML API documentation for all available builder methods.
5959

6060
```csharp
6161
var options = PolylineEncodingOptionsBuilder.Create()
62-
.SetMaxBufferSize(5000)
63-
// .EnableLogging(myLogger) // (if applicable)
62+
.WithStackAllocLimit(512)
63+
.WithLoggerFactory(myLoggerFactory)
6464
.Build();
6565

6666
var encoder = new PolylineEncoder(options);

api-reference/guide/toc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
- name: Configuration
66
href: configuration.md
77
- name: Advanced Scenarios
8-
href: advanced-scenarions.md
8+
href: advanced-scenarios.md
99
- name: Sample
1010
href: sample.md
1111
- name: FAQ

src/PolylineAlgorithm/Properties/ExceptionMessageResource.Designer.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/PolylineAlgorithm/Properties/ExceptionMessageResource.resx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@
124124
<value>Polyline is malformed at position {0}.</value>
125125
</data>
126126
<data name="PolylineCannotBeShorterThanFormat" xml:space="preserve">
127-
<value>Argument cannot be shorten than {1} characters. Value: {0}.</value>
127+
<value>Argument cannot be shorter than {1} characters. Value: {0}.</value>
128128
</data>
129129
<data name="ArgumentValueMustBeFiniteNumber" xml:space="preserve">
130130
<value>Value must be a finite number.</value>

0 commit comments

Comments
 (0)