Pattern Matching Enhancement: Switch Pattern

Just had a look at the “new” C# 8.0 Features So I tried to rewrite the following code private static void RunExample(ExampleCode exampleCode) { switch(exampleCode) { case ExampleCode.DefaultInterfaceMethod: RunDefaultInterfaceMethodExample(); break; case ExampleCode.PatternMatchingEnhancements: RunPatternMatchingEnhancementsExample(); break; } } to this: private static void RunExample(ExampleCode exampleCode) { exampleCode switch { ExampleCode.DefaultInterfaceMethod => RunDefaultInterfaceMethodExample(), ExampleCode.PatternMatchingEnhancements => RunPatternMatchingEnhancementsExample() }; }…

Details

welcome message duplicated in Facebook channel

I’m using the following pattern used in multiple samples and it works fine in WebChat and Emulator channels but when I connected my bot to the Facebook channel it sends a duplicate welcome message. protected override async Task OnMembersAddedAsync(IList<ChannelAccount> membersAdded, ITurnContext<IConversationUpdateActivity> turnContext, CancellationToken cancellationToken) { var welcomeText = “Hello and welcome!”; foreach (var member in…

Details