Skip to content

Replace unsupported SOAP serialization in time zone snippet - #12975

Closed
gewarren with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-code-review-comment-again
Closed

Replace unsupported SOAP serialization in time zone snippet#12975
gewarren with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-code-review-comment-again

Conversation

Copilot AI commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

The referenced InvalidTimeZoneException snippet uses SoapFormatter, which isn't supported on modern .NET. The snippet now persists only the exception message using JSON.

  • Serialization

    • Replaced SoapFormatter and IFormatter with System.Text.Json.
    • Writes the exception message to tzNotFound.json.
  • Deserialization

    • Reads and deserializes the JSON message before displaying it.
string exceptionMessage = JsonSerializer.Serialize(serializedException.Message);
File.WriteAllText("tzNotFound.json", exceptionMessage);

Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix code based on review comment Replace unsupported SOAP serialization in time zone snippet Aug 10, 2026
Copilot AI requested a review from gewarren August 10, 2026 23:42
@gewarren gewarren closed this Aug 11, 2026
@gewarren
gewarren deleted the copilot/fix-code-review-comment-again branch August 11, 2026 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants