From 6cdc48bfa66bd48108e9931778ad4fbb95607ea1 Mon Sep 17 00:00:00 2001 From: Joe4evr Date: Wed, 7 Jun 2017 04:32:59 +0200 Subject: [PATCH] Move instructions about BuildServiceProvider() up --- docs/guides/getting_started/samples/intro/structure.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/guides/getting_started/samples/intro/structure.cs b/docs/guides/getting_started/samples/intro/structure.cs index bdbdf8fe4..000ee2d02 100644 --- a/docs/guides/getting_started/samples/intro/structure.cs +++ b/docs/guides/getting_started/samples/intro/structure.cs @@ -99,16 +99,16 @@ class Program // and other dependencies that your commands might need. _map.AddSingleton(new SomeServiceClass()); - // Either search the program and add all Module classes that can be found: - await _commands.AddModulesAsync(Assembly.GetEntryAssembly()); - // Or add Modules manually if you prefer to be a little more explicit: - await _commands.AddModuleAsync(); - // When all your required services are in the collection, build the container. // Tip: There's an overload taking in a 'validateScopes' bool to make sure // you haven't made any mistakes in your dependency graph. _services = _map.BuildServiceProvider(); + // Either search the program and add all Module classes that can be found: + await _commands.AddModulesAsync(Assembly.GetEntryAssembly()); + // Or add Modules manually if you prefer to be a little more explicit: + await _commands.AddModuleAsync(); + // Subscribe a handler to see if a message invokes a command. _client.MessageReceived += HandleCommandAsync; }