Configure app samples and use source generators #231
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces several improvements and new features to the Microsoft.Bot.Core SDK, focusing on enhanced JSON serialization for AOT compatibility, middleware extensibility, and developer experience. The most significant changes are grouped below:
Serialization and AOT Compatibility
CoreActivityJsonContext) for core activity types, enabling reflection-free and AOT-compatible serialization and deserialization throughout the SDK. Updated all relevant serialization methods inCoreActivityand related schema classes to use this context for base types, while maintaining reflection-based serialization for extended/custom types. [1] [2] [3] [4] [5] [6] [7]Propertiesmember inCoreActivity,ChannelData,Conversation, andConversationAccountfrominittosetto support deserialization scenarios, with appropriate suppression of CA2227 warnings. [1] [2] [3] [4]aot-checks) and sample code to verify AOT serialization/deserialization of Teams activities. [1] [2] [3]Middleware and Extensibility
middleware.cs) demonstrating how to use custom turn middleware with the bot application, improving extensibility and developer onboarding.AddBotApplicationClientsto gracefully handle missing configuration sections, logging a warning and providing fallback behavior.Developer Experience and Documentation
Microsoft.Bot.Corewith installation instructions and usage examples, including how to run scenarios and use the playground.Sample and Logging Improvements
BotApplicationto include the SDK version and improved the sample bot reply to display SDK version, activity details, and conversation info. [1] [2] [3]ConversationClientfor robustness. [1] [2]