Browse Source

Fix broken code snippet in dependency injection docs (#2420)

* Fixed markdown formatting to show code snippet

* Fixed constructor injection code snippet pointer
tags/3.8.0
Charlie U GitHub 2 years ago
parent
commit
ddcf68a29f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      docs/guides/dependency_injection/injection.md

+ 1
- 1
docs/guides/dependency_injection/injection.md View File

@@ -16,7 +16,7 @@ This can be done through property or constructor.
Services can be injected from the constructor of the class.
This is the preferred approach, because it automatically locks the readonly field in place with the provided service and isn't accessible outside of the class.

[!code-csharp[Property Injection(samples/property-injecting.cs)]]
[!code-csharp[Constructor Injection](samples/ctor-injecting.cs)]

## Injecting through properties



Loading…
Cancel
Save