Sossenbinder
Sossenbinder
CC#
Created by Dalia on 6/9/2024 in #help
strategy design pattern on discount
I agree, more context would be great. But I imagine this is some kind of uni / school task which just wants to see any usage of the pattern? What I could think of would be having a sales component in your system which should dynamically react on specific pricing policies. That could be discounts, it could however also be different sales logic for different consumer markets, which might be extended without you wanting to touch the initial component tapping into these strategies
7 replies
CC#
Created by Alex on 5/15/2024 in #help
✅ what's the difference?
With http through a controller you just get to benefit from the entire streamlined pipeline built around it, and your client will always receive some response back (Plus you are not bound to a more specific protocol in case you want to provide your API to someone else down the road)
4 replies
CC#
Created by Alex on 5/15/2024 in #help
✅ what's the difference?
You can even have multiple hubs using a single websocket connection, if I recall correctly it will be multiplexed under the hood. You can also use signalr for bidirectional connection, but there are some drawbacks. First, if signalr uses e.g. websockets, you are bound to a long lasting http connection, and you will not be able to profit from something like round robin load balancing. Then you are also not forced to "respond" to a request, so the client might be left hanging unless you build a request reply setup yourself
4 replies
CC#
Created by Core on 3/30/2024 in #help
Are there other options for storing keys other than Azure Key Vault?
Would using a certificate work? For that one you could get the private key
14 replies
CC#
Created by duaalk on 3/21/2024 in #help
Dotnet CLI
Also for CI/CD environments or Dockerfiles
7 replies
CC#
Created by UnemployedNinja on 3/19/2024 in #help
✅ Is this necessary?
I think disposing of the HttpClient will not dispose the response messages it "generated". Disposing the response message in turn will dispose underlying streams it keeps open. But I think it's actually relatively rare you need to work at this level, because most of the higher level abstractions around HttpClient will handle this for you, and only return e.g. the string to be converted to json
7 replies
CC#
Created by CodeMan on 3/4/2024 in #help
Dynamic channel/queue system where only one unit of a particular group can process at any given time
Or you could reenqueue the blocked item in case order is not as important
19 replies
CC#
Created by CodeMan on 3/4/2024 in #help
Dynamic channel/queue system where only one unit of a particular group can process at any given time
Worst case you need to sequentially wait if an initial queue containing all items might have a sequence of the same ID somewhere
19 replies
CC#
Created by CodeMan on 3/4/2024 in #help
Dynamic channel/queue system where only one unit of a particular group can process at any given time
Best case you can distribute Tasks piece by piece with little collision
19 replies
CC#
Created by CodeMan on 3/4/2024 in #help
Dynamic channel/queue system where only one unit of a particular group can process at any given time
Would a ConcurrentDictionary storing the active task per group Id be an option?
19 replies
CC#
Created by Ares on 3/1/2024 in #help
dotnet user secrets not working
But the answer is from Net6 still, but worth a shot I guess
11 replies
CC#
Created by Ares on 3/1/2024 in #help
dotnet user secrets not working
Maybe that's the issue you also run into
11 replies
CC#
Created by Ares on 3/1/2024 in #help
dotnet user secrets not working
I wrote an answer on SO for a similar problem once
11 replies
CC#
Created by Ares on 3/1/2024 in #help
dotnet user secrets not working
In that case I had some issues with user secrets mounting
11 replies
CC#
Created by Ares on 3/1/2024 in #help
dotnet user secrets not working
Is the app running in a docker container (Since you mentioned Docker)?
11 replies
CC#
Created by niels on 2/21/2024 in #help
Complex question
I think what you can get though would be something like a switch expression so you can at least get code navigation to help you out
6 replies
CC#
Created by niels on 2/21/2024 in #help
Complex question
I imagine your question would relate to something like a Discriminated Union of types which would be able to infer the result type based on guard clauses, like e.g. TypeScript can
6 replies
CC#
Created by niels on 2/21/2024 in #help
Complex question
It would have to be backed by the type system
6 replies
CC#
Created by niels on 2/21/2024 in #help
Complex question
Not really, I think what you describe is meant to be a runtime construct, and in that regard, no
6 replies