Skip to main content
Commonmark migration
Source Link

Here's one of the usecases (hint there's absolutely no ExpandoObject and it's entirely typesafe to use). Here's the Config that is being used, once again not a single ExpandoObject down the tree.

 

Here is the first and only use of ExpandoObject. This link is also in the question.

Here's one of the usecases (hint there's absolutely no ExpandoObject and it's entirely typesafe to use). Here's the Config that is being used, once again not a single ExpandoObject down the tree.

 

Here is the first and only use of ExpandoObject. This link is also in the question.

Here's one of the usecases (hint there's absolutely no ExpandoObject and it's entirely typesafe to use). Here's the Config that is being used, once again not a single ExpandoObject down the tree.

Here is the first and only use of ExpandoObject. This link is also in the question.

added 2158 characters in body
Source Link
Joelius
  • 355
  • 2
  • 12

EDIT:

After a discussion with @t3chb0t I feel like I have to mention this:
The whole exchange is in the comments.

I'm not at all saying that using this ExpandoObject is good. It feels like a hack because it is one. However I've not found a way to remove it as I have no idea how you would do the custom serialization for .NET (instead of JSON.NET) and also how you would remove the null values. If you have an idea for that which doesn't use ExpandoObject I'd love to hear it. The ExpandoObject does not at all interfere with the typesafety and is 100% only used for the serialization (particularly the removing of the null values and adapting the custom enum values). It's never exposed publicly in any way.

If you have an idea to get rid of the ExpandoObject feel free to tell me but don't just call me out for using ExpandoObject without understanding the situation.
It is used as little as possible and only has to do with some serialization behind the scenes, the developer who uses the library will never have anything to do with an ExpandoObject and even if you'd develop code for this library the chance is extremely small that you would need to do something with ExpandoObject. It does not hurt the typesafety of the config because that's a typesafe class and has nothing to do with ExpandoObject until the serialization.

I hope you understand. If you don't, let me know what you don't understand and look at the repository. There are parts from our exchange which point out some important files:

Here's one of the usecases (hint there's absolutely no ExpandoObject and it's entirely typesafe to use). Here's the Config that is being used, once again not a single ExpandoObject down the tree.

Here is the first and only use of ExpandoObject. This link is also in the question.

EDIT:

After a discussion with @t3chb0t I feel like I have to mention this:
The whole exchange is in the comments.

I'm not at all saying that using this ExpandoObject is good. It feels like a hack because it is one. However I've not found a way to remove it as I have no idea how you would do the custom serialization for .NET (instead of JSON.NET) and also how you would remove the null values. If you have an idea for that which doesn't use ExpandoObject I'd love to hear it. The ExpandoObject does not at all interfere with the typesafety and is 100% only used for the serialization (particularly the removing of the null values and adapting the custom enum values). It's never exposed publicly in any way.

If you have an idea to get rid of the ExpandoObject feel free to tell me but don't just call me out for using ExpandoObject without understanding the situation.
It is used as little as possible and only has to do with some serialization behind the scenes, the developer who uses the library will never have anything to do with an ExpandoObject and even if you'd develop code for this library the chance is extremely small that you would need to do something with ExpandoObject. It does not hurt the typesafety of the config because that's a typesafe class and has nothing to do with ExpandoObject until the serialization.

I hope you understand. If you don't, let me know what you don't understand and look at the repository. There are parts from our exchange which point out some important files:

Here's one of the usecases (hint there's absolutely no ExpandoObject and it's entirely typesafe to use). Here's the Config that is being used, once again not a single ExpandoObject down the tree.

Here is the first and only use of ExpandoObject. This link is also in the question.

tag
Link
dfhwze
  • 13.9k
  • 3
  • 38
  • 101
added 541 characters in body; added 61 characters in body
Source Link
Joelius
  • 355
  • 2
  • 12
Loading
Tweeted twitter.com/StackCodeReview/status/1146388253727236096
title
Link
dfhwze
  • 13.9k
  • 3
  • 38
  • 101
Loading
Source Link
Joelius
  • 355
  • 2
  • 12
Loading