QoL - Microsoft.Bot namespace collides with Bot class name
See original GitHub issueBecause the root namespace is Microsoft.Bot
and there is a class named Bot
, there is no way to use the plain class name in code without either aliasing it or prefixing it with the Builder
namespace. That means that a new user sitting down and writing the following code:
Bot myBot = new Bot(...);
Will immediately run into errors with intellisense finding the class and putting red squigglies under the class name, and the following compile time error:
Error CS0118 'Bot' is a namespace but is used like a type
Instead you are forced to use either explicit namespace scoping:
Builder.Bot myBot = new Builder.Bot(...);
Or you would have to alias the Bot
class to a name that doesn’t collide like:
using BotIMean = Microsoft.Bot.Builder.Bot;
.
.
.
BotIMean myBot = new BotIMean(...);
This is going to be a problem for those who just sit down to use the SDK for the first time and also seems like a silly thing to have to constantly work around. Either the namespace could be renamed to something like Microsoft.Bots
or the class could be renamed, but that seems less appropriate since that really is the “thing” that the noun represents.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (4 by maintainers)
There’s also the Lisp Variant: (((((((((((((((((((((((((((b(((((((((((((((((((o(((((((((((((((((((((((((((t))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
we should consider using the name:
class BotBuilderBotThatUsesMiddlewareAndPluginsToPostAndReceiveActivities {}
In case there is ever an Objective-C port in the future. 😉