Browse Source

Fix DI module example

pull/988/head
Hsu Still 7 years ago
parent
commit
91ff88e2ee
No known key found for this signature in database GPG Key ID: 8601A145FDA95209
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      docs/guides/commands/samples/dependency_module.cs

+ 4
- 4
docs/guides/commands/samples/dependency_module.cs View File

@@ -21,16 +21,16 @@ public class ModuleA : ModuleBase<SocketCommandContext>

public class ModuleB : ModuleBase<SocketCommandContext>
{

// Public settable properties will be injected
// Public settable properties will be injected.
public AnnounceService Announce { get; set; }

// Public properties without setters will not
// Public properties without setters will not be injected.
public CommandService Commands { get; }

// Public properties annotated with [DontInject] will not
// be injected.
[DontInject]
public NotificationService { get; set; }
public NotificationService NotificationService { get; set; }

public ModuleB(CommandService commands)
{


Loading…
Cancel
Save