Poller
Poller
CC#
Created by Poller on 7/3/2024 in #help
Kestrel https url binding warning
i would not deploy to IIS any day 😄 i usually run all the services in a unix context(bare or container is close to the same)
10 replies
CC#
Created by Poller on 7/3/2024 in #help
Kestrel https url binding warning
not learning. i was just looking into redirect and configure ssl via appsettings.json.
10 replies
CC#
Created by RedTShirtGaming on 7/4/2024 in #help
async functions always finish on a background thread
take a look at minecraft. if you move too fast, you see chunk holes until they are loaded.
60 replies
CC#
Created by RedTShirtGaming on 7/4/2024 in #help
async functions always finish on a background thread
oh so its a chunk generator. well that can be a background service. that data is not needed frame by frame. its just expanding the known rendering data.
60 replies
CC#
Created by RedTShirtGaming on 7/4/2024 in #help
async functions always finish on a background thread
also if it takes 250ms it cant be called multiple times a frame because a 60fps frame is about 16ms in time...
60 replies
CC#
Created by RedTShirtGaming on 7/4/2024 in #help
async functions always finish on a background thread
what work is happening there in the packground?
60 replies
CC#
Created by RedTShirtGaming on 7/4/2024 in #help
async functions always finish on a background thread
thats true. i did not pay attention of the amount of time (usually its not relevant). if something takes that long in the background and i need the value i usually go for a background operating service with signalling functionality. but i am not that much into game dev, so not 100% sure what is done for 5 seconds in background work.
60 replies
CC#
Created by RedTShirtGaming on 7/4/2024 in #help
async functions always finish on a background thread
depending on the work happening here, this could be ideal. if he wants to offload all work and only return some rendering relevant data a main thread invocation method should be enough.
60 replies
CC#
Created by RedTShirtGaming on 7/4/2024 in #help
async functions always finish on a background thread
in the case of your initial sample. why even use Task.Run? you could just await some task and the scheduler brings you back to your calling task for further processing..
60 replies
CC#
Created by The Fog from Human Resources on 7/5/2024 in #help
What is dependency injection and when should I realistically use it
im going to make a few assumptions here, so if i am wrong in anything please dont feel offended. - if you ask this question it sounds like also things like SOLID are not much known. so this seems not to be a partial issue, but a more breader from i think lacking experience.(DI alone might not change much in terms of impovement for you) - if you create code that is structured and uses DI you can propperly test your stuff. (a static function call can not be mocked, but if you inject a service (interface!!! ) you then in unit test can mock that external service call. - using static methods/classes binds everything to that implementation. forever. thats a small cut of how i see this. feel free to ask if i didnt explain something clear.
17 replies
CC#
Created by Emberfire on 7/5/2024 in #help
Dependency injection approach for object, used only in a single method
no rush.
27 replies
CC#
Created by Emberfire on 7/5/2024 in #help
Dependency injection approach for object, used only in a single method
not something i expect to need often, but cant hurt to have in my toolbelt.
27 replies
CC#
Created by Emberfire on 7/5/2024 in #help
Dependency injection approach for object, used only in a single method
great. could you be so kind and ping me with your research results (and maybe sources then)?
27 replies
CC#
Created by Emberfire on 7/5/2024 in #help
Dependency injection approach for object, used only in a single method
yeah 🙂 its about the same place in hell.
27 replies
CC#
Created by Emberfire on 7/5/2024 in #help
Dependency injection approach for object, used only in a single method
you can mix and match controllers with minimal api. (not a good idea, but technically possible)
27 replies
CC#
Created by Emberfire on 7/5/2024 in #help
Dependency injection approach for object, used only in a single method
we there can lay out the route structure in folders and use a IEndpoint interface to scan the assembly at startup and map all found classes.
27 replies
CC#
Created by Emberfire on 7/5/2024 in #help
Dependency injection approach for object, used only in a single method
we currently rebuild an api (net framework 3.5) with 450 calls as minimal api project. 0 regrets.
27 replies
CC#
Created by Emberfire on 7/5/2024 in #help
Dependency injection approach for object, used only in a single method
to answer this: you could. then the class would only be instanciated in that call that needs it, but then the controller scheme is unclear.
27 replies
CC#
Created by Emberfire on 7/5/2024 in #help
Dependency injection approach for object, used only in a single method
then everything is instanciated only if required(based on lifetime).
27 replies
CC#
Created by Emberfire on 7/5/2024 in #help
Dependency injection approach for object, used only in a single method
is the minimal api approach not feasable?
27 replies