Auros
❔ Resolve a service before the container is built
Not that I know of. If you need to set the shared object, do it after you call
WebApplication.CreateBuilder
.
Technically a lambda provided to ctx.Host.ConfigureServices
is called while the container is building, but that's not really an ideal event.51 replies
❔ Resolve a service before the container is built
I might be wrong with what you're trying to do, but if the shared object doesn't require a dependency from the built container, you can use the
builder.Host.Properties
dictionary to store shared objects during the host building process.51 replies
❔ Resolve a service before the container is built
If I'm reading this correctly, you want to resolve a service, and then use that service to further configure your services?
Can you prove a code example of what you would like to do? (It doesn't have to work)
51 replies
✅ HTTP/3 Server Without AspNetCore
I've had these in my github stars
https://github.com/chronoxor/NetCoreServer
https://github.com/scottoffen/grapevine
12 replies
Help, how to make this unity save and load system work?
According to the Unity documentation https://docs.unity3d.com/ScriptReference/JsonUtility.ToJson.html, it appears you are not allowed to serialize an array and presumably List<T> directly, as it tries to serialize the public fields on the List object itself, not the contents within.
You need to wrap the list in a separate serializable class or struct, which you seem to already have with
ListObjectToSave
but aren't using.
Try replacing this line in your Save method from
to
and change the type and assignment of the JsonUtility.FromJson
call in your Load method.
You might also need to add a [System.Serializable]
attribute to the ListObjectToSave
class.6 replies