Browse Source

Fix DepMap sample formatting

pull/826/head
Hsu Still 8 years ago
parent
commit
7774602e92
1 changed files with 8 additions and 8 deletions
  1. +8
    -8
      docs/guides/commands/samples/dependency_map_setup.cs

+ 8
- 8
docs/guides/commands/samples/dependency_map_setup.cs View File

@@ -6,13 +6,13 @@ public async Task InstallAsync(DiscordSocketClient client)
// Here, we will inject the ServiceProvider with
// all of the services our client will use.
_services = new ServiceCollection()
.AddSingleton(client)
.AddSingleton(_commands)
// You can pass in an instance of the desired type
.AddSingleton(new NotificationService())
// ...or by using the generic method.
.AddSingleton<DatabaseService>()
.BuildServiceProvider();
.AddSingleton(client)
.AddSingleton(_commands)
// You can pass in an instance of the desired type
.AddSingleton(new NotificationService())
// ...or by using the generic method.
.AddSingleton<DatabaseService>()
.BuildServiceProvider();
// ...
await _commands.AddModulesAsync(Assembly.GetEntryAssembly());
}
}

Loading…
Cancel
Save