Jacko
Jacko
Explore posts from servers
CC#
Created by Jacko on 2/3/2025 in #help
Question about Dependency Injection:
What are your use cases that make medi better for it ?
67 replies
CC#
Created by Jacko on 2/3/2025 in #help
Question about Dependency Injection:
I’m also looking into the decorator pattern autofac supports for implementing logging and other features on some interfaces provided by other libraries
67 replies
CC#
Created by Jacko on 2/3/2025 in #help
Question about Dependency Injection:
I’m definitely still looking into autofac to see if it’s required, some of the features like xml configuration for loading in interfaces could be useful to adapt the project for different businesses that might use different log systems or want to store configurations in different formats or on the cloud.
67 replies
CC#
Created by Jacko on 2/3/2025 in #help
Question about Dependency Injection:
Out of curiosity what’s the benefit of using the IServiceCollection interface over just the autofac container? I’m using spectre cli which lets me register any DI system so wasn’t sure if it was just for generic host support
67 replies
CC#
Created by Jacko on 2/3/2025 in #help
Question about Dependency Injection:
Modern dotnet, it’s a brand new project
67 replies
CC#
Created by Jacko on 2/3/2025 in #help
Question about Dependency Injection:
So I’m writing a cli app that has a plugin system so users can add custom functionality and call it from the same cli app, so if you have for example an automation you just register it in the plugins folder and the app will pick it up and execute it for you
67 replies
CC#
Created by Jacko on 2/3/2025 in #help
Question about Dependency Injection:
I know autofac has some assembly loading features so I wasn’t sure whether to use autofac, or Microsoft Di and scrutor together
67 replies
CC#
Created by Jacko on 2/3/2025 in #help
Question about Dependency Injection:
All the plugins will be in a specific folder so I’ll just be searching for all dlls in the folder, then registering all the classes that implement IPlugin
67 replies
CC#
Created by Jacko on 2/3/2025 in #help
Question about Dependency Injection:
Ahh I was considering it related to DI because some DI implementations have features for loading assemblies as certain interfaces and registering them for the rest of the app
67 replies
CC#
Created by Jacko on 2/3/2025 in #help
Question about Dependency Injection:
I’ve also seen scrutor mentioned a lot, would that be a better library to use for my purposes ?
67 replies
CC#
Created by Jacko on 2/3/2025 in #help
Question about Dependency Injection:
Also on that topic do many people still use autofac since Microsoft di came out ?
67 replies
CC#
Created by Jacko on 2/1/2025 in #help
✅ Can custom attributes use interfaces somehow ?
Yeah exactly
13 replies
CC#
Created by Jacko on 2/1/2025 in #help
✅ Can custom attributes use interfaces somehow ?
I’m using dependency injection and I need the StaticConfiguration class to get the values from an interface of type IConfiguration
13 replies
CC#
Created by Jacko on 2/1/2025 in #help
✅ Can custom attributes use interfaces somehow ?
Sorry it doesn't need to be a local variable, it can be Settings settings;
13 replies
CC#
Created by Jacko on 1/31/2025 in #help
How to configure services in my cli application:
What do you mean by this ?
15 replies
CC#
Created by Jacko on 1/31/2025 in #help
How to configure services in my cli application:
Ahh okay so you’re suggesting creating the config object before the di container so I can just pass properties into the .withLogging function as a parameter for example ?
15 replies
CC#
Created by Jacko on 1/31/2025 in #help
How to configure services in my cli application:
It could be passed in I just wasn’t sure if it was a good idea writing container_builder().withLogging(config).withOtherService(config)
15 replies
CC#
Created by Jacko on 1/28/2025 in #help
Configuring a spectre cli app:
Oh that’s odd, I’ll give it a try thank you !
8 replies
CC#
Created by Jacko on 1/28/2025 in #help
Configuring a spectre cli app:
To follow best practices like /etc on Linux
8 replies
CC#
Created by Jacko on 1/28/2025 in #help
Configuring a spectre cli app:
Do I need to check the os before placing the file into the correct directory ?
8 replies