News for hackers. Stuff that matters.
Re:Ask HN: Examples of Top C# Code? by dajo on Tuesday October 25, 2022 @08:16AM (#33329477)
I like the Stripe API design, and as a follow-on, I tend to like their coding styles and structures. Here's their official Stripe dotnet library - https://github.com/stripe/stripe-dotnet. It's well organized and the code coverage looks good.
Re:Ask HN: Examples of Top C# Code? by smithcoin on Tuesday October 25, 2022 @08:43AM (#33329717)
This applies to their libraries in other languages as well, their Ruby one is a great reference too.
Re:Ask HN: Examples of Top C# Code? by automatic6131 on Tuesday October 25, 2022 @08:48AM (#33329768)
Does this, errr, do anything? If it's just a C# adapter for a web api, then it's extremely dull infrastructure code. All you get is code style opinions and folder choices.
Re:Ask HN: Examples of Top C# Code? by DoctorOW on Tuesday October 25, 2022 @09:51AM (#33330448)
Code style opinions and folder choices is vaguely what OP is asking for though, right?
Re:Ask HN: Examples of Top C# Code? by Hawxy on Tuesday October 25, 2022 @09:48AM (#33330399)
I'd argue this library design is fairly ancient in C# land. The reliance on static configuration values goes against modern DI-centric design + integration patterns. It also doesn't have a central entry-point for discoverability and instead expects each internal client to be used directly.