-
In my project that uses PrettyPrompt, which is a shell, I would like the user to be able to customize most thing from their profile file, which is code. My problem is that this would be already after I initialized my Having a setter on the properties would also allow using a C# object initializer, which at least in my opinion looks nicer. I have hacked around this using reflection and can confirm that changing If you are open to adding setters on some properties I would be glad to make a PR, but I am afraid I would mess up with adding a setter to at least one property that wouldn't work when set after initialized or something. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @Jan0660, there's no specific reason for not having setters. The main reason, as you mentioned, is that we can't guarantee that the prompt will behave correctly if properties are being mutated as the prompt is running. That being said, if you'd like to open a PR for the properties that you need to be settable, I'd be happy to do some testing and merge it. I'd rather expose setters on just the subset of properties that you need, rather than all of them. |
Beta Was this translation helpful? Give feedback.
Hi @Jan0660, there's no specific reason for not having setters. The main reason, as you mentioned, is that we can't guarantee that the prompt will behave correctly if properties are being mutated as the prompt is running.
That being said, if you'd like to open a PR for the properties that you need to be settable, I'd be happy to do some testing and merge it. I'd rather expose setters on just the subset of properties that you need, rather than all of them.