Skip to content

Simplify NamedPipeBase#7518

Merged
Evangelink merged 2 commits intomainfrom
dev/ygerges/keynotfound
Mar 10, 2026
Merged

Simplify NamedPipeBase#7518
Evangelink merged 2 commits intomainfrom
dev/ygerges/keynotfound

Conversation

@Youssef1313
Copy link
Copy Markdown
Member

@Youssef1313 Youssef1313 commented Mar 10, 2026

We don't need to throw our own InvalidOperationException here for case that should never be hit in practice. Instead, we can let the dictionary implementation throws KeyNotFoundException which will have the same amount of information as our exception.

Copilot AI review requested due to automatic review settings March 10, 2026 19:59
@Evangelink Evangelink enabled auto-merge March 10, 2026 20:03
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes two unused serializer-related localized resource strings and simplifies the IPC serializer lookup implementation in NamedPipeBase.

Changes:

  • Deleted NoSerializerRegisteredWithIdErrorMessage / NoSerializerRegisteredWithTypeErrorMessage entries from PlatformResources.resx and all corresponding .xlf translations.
  • Removed the generated resource accessors for those keys from PlatformResources.cs.
  • Simplified NamedPipeBase.GetSerializer(...) to use direct dictionary indexing.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.zh-Hant.xlf Removed translation units for deleted serializer error messages.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.zh-Hans.xlf Removed translation units for deleted serializer error messages.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.tr.xlf Removed translation units for deleted serializer error messages.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.ru.xlf Removed translation units for deleted serializer error messages.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.pt-BR.xlf Removed translation units for deleted serializer error messages.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.pl.xlf Removed translation units for deleted serializer error messages.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.ko.xlf Removed translation units for deleted serializer error messages.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.ja.xlf Removed translation units for deleted serializer error messages.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.it.xlf Removed translation units for deleted serializer error messages.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.fr.xlf Removed translation units for deleted serializer error messages.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.es.xlf Removed translation units for deleted serializer error messages.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.de.xlf Removed translation units for deleted serializer error messages.
src/Platform/Microsoft.Testing.Platform/Resources/xlf/PlatformResources.cs.xlf Removed translation units for deleted serializer error messages.
src/Platform/Microsoft.Testing.Platform/Resources/PlatformResources.resx Removed the two serializer error message resource entries.
src/Platform/Microsoft.Testing.Platform/Resources/PlatformResources.cs Removed the two resource accessor properties for the deleted keys.
src/Platform/Microsoft.Testing.Platform/IPC/NamedPipeBase.cs Changed serializer lookup to dictionary indexer (affects exception type/message on missing serializer).

@Evangelink Evangelink merged commit c81adb8 into main Mar 10, 2026
10 checks passed
@Evangelink Evangelink deleted the dev/ygerges/keynotfound branch March 10, 2026 22:16
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.

3 participants