Closed MarkStega closed 6 years ago
Yes, that is not an issue o the Logging component.
As the message states, [Inject]
only work on non-public properties, not on fields.
Please check Blazor docs for further details about it: https://blazor.net/docs/dependency-injection.html
Let me know if I can help you further.
@galvesribeiro
The sample inject is straight from the readme.md at the root of the logging repository so you probably should update that...
Sorry, I just fixed the Readme.md.
I am trying to use the logging extensions outside of a cshtml file. In my class implementation RestProcessService I have placed
right after the class declaration. I get "Attibute 'inject' is not valid on this declaration type. It is only valid on 'property, indexer' declarations." when hovering over the red squiggles under "[Inject]".