fooo1
❔ getting sensitive config from .csproj
Now that you mention it - indeed why not just use System.Environment.GetEnvironmentVariable - no need to modify csproj. I think I got derailed as I originally wanted different envs for prod and dev, but again - just getting env vars directly could be enough
14 replies
✅ Reading a yaml file that has multiple types
Here's the solution I came up with - intermediate deserialization to json, this way I avoid having to define a model. Would you say there are any immediate shortcomings, other than everything being string by default?
invoking
16 replies
✅ Reading a yaml file that has multiple types
that still requires defining types for all keys in yaml. I suppose I'm wondering (coming from python, so very new) is there a way to query for a value without first defining the types? i.e.
dynamic value = configuration[key];
whereas value could be anything - list, string - and leaving up to the user to interact with value correctly?16 replies
❔ ✅ Why doesn't this basic HttpClient GET request doesn't work as expected?
ahh I see. I wrongly assumed
void
and Task
are both valid types, depending on your needs, but seems async code should always (for beginners atleast) be Task - is that correct?
As per your suggestion, changed using to be declerative - using HttpClient client = new();
26 replies