Repository navigation
Add .NET 10 multi-targeting and CDN-style URL formatting compatibility - #15
Conversation
Co-authored-by: chsword <274085+chsword@users.noreply.github.com>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Resolve the three URL-formatting issues identified in ResizingUtil.cs, including the critical AWS syntax issue.
Review effort: Lite
Findings: 1
Open (3)
What changed in this PR
Adds .NET 10 support and CDN-specific URL formatting while preserving legacy APIs.
Changes:
- Adds
net10.0targeting and CI coverage. - Adds
Formatcompatibility alias. - Adds Tencent, Aliyun, and AWS CDN URL helpers, tests, and documentation.
- Review identified unresolved Pad mapping, AWS token, and URL-fragment handling issues.
| File | Description |
|---|---|
source/ResizingClient/ResizingUtil.cs |
Adds formatting APIs and CDN URL generation. |
source/ResizingClient/ResizingClient.csproj |
Adds the .NET 10 target. |
source/ResizingClient.Tests/UnitTest1.cs |
Tests new formatting APIs. |
README.md |
Documents supported frameworks and APIs. |
.github/workflows/dotnet-ci-release.yml |
Updates framework-specific CI builds. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| var fitToken = "fit_cover"; | ||
| switch (mode) | ||
| { | ||
| case ResizingMode.Max: | ||
| fitToken = "fit_contain"; | ||
| break; | ||
| case ResizingMode.Pad: | ||
| fitToken = "fit_pad"; | ||
| break; | ||
| } |
| var query = mode == ResizingMode.Crop | ||
| ? $"imageMogr2/thumbnail/{width}x{height}/gravity/center/crop/{width}x{height}" | ||
| : $"imageMogr2/thumbnail/{width}x{height}"; |
| static string AppendQuery(string url, string query) | ||
| { | ||
| if (string.IsNullOrWhiteSpace(url)) return url; | ||
| return url.IndexOf('?', StringComparison.Ordinal) >= 0 | ||
| ? $"{url}&{query}" | ||
| : $"{url}?{query}"; | ||
| } |
|
@copilot Fix the code for all comments in this review thread. When a review comment includes a suggested change, apply the suggestion exactly. Do not make changes beyond what is described in the linked review thread. |
Co-authored-by: chsword <274085+chsword@users.noreply.github.com>
Co-authored-by: chsword <274085+chsword@users.noreply.github.com>
Co-authored-by: chsword <274085+chsword@users.noreply.github.com>
Addressed in 565368b. |
|
@openai-code-agent[agent] 补全单元测试 |
|
@copilot 补全单元测试 |
Co-authored-by: chsword <274085+chsword@users.noreply.github.com>
|
ci 失败 是不是需要修改 @copilot |
Co-authored-by: chsword <274085+chsword@users.noreply.github.com>
…6-2304-4181-a26f-944951529bcd Add .NET 10 multi-targeting and CDN-style URL formatting compatibility


This change upgrades
ResizingClientcompatibility to include.NET 10while preserving existing targets and legacy URL behavior. It also adds first-class URL formatting support for Tencent CDN, Aliyun CDN, and AWS image-processing query styles without breaking existingFormatUrlusage.Framework compatibility
ResizingClienttarget frameworks to includenet10.0alongsidenet45,netstandard2.0, andnet8.0.net8.0and SDK 10 job buildsnet10.0, avoiding cross-SDK target mismatch.Backward-compatible client API
ResizingUtil.Format(...)as a compatibility alias toFormatUrl(...)to preserve older calling patterns.c/m/p) unchanged for current format-string URL generation.CDN URL style support
ResizingUtil.FormatTencentCdnUrl(...)for Tencent-styleimageMogr2parameters.ResizingUtil.FormatAliyunCdnUrl(...)for Aliyun-stylex-oss-process=image/resize,....ResizingUtil.FormatAwsCdnUrl(...)for AWS-stylex-amz-process=image/resize,....?or&depending on whether the base URL already contains query parameters.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
ab.chatgpt.com/opt/hostedtoolcache/node/24.21.0/x64/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-REDACTED-linux-musl/codex/codex(dns block)If you need me to access, download, or install something from one of these locations, you can either: