I think internal is the least complicated and best approach (this, of course, includes several assemblies). If you are not doing some complicated overhead to determine the caller in the property adjuster, you can try:
interface IPerson { Name { get; set; } }
and implement this interface explicitly:
class Person : IPerson { Name { get; private set; } string IPerson.Name { get { return Name; } set { Name = value; } } }
then do explicit interface tricks in your builder to set properties. This still does not protect your implementation and is not a good solution, although it does make some way to emphasize your intention.
In your property installers, you will need to do an event notification. Approaching this problem, I did not create separate events and event handlers for each property, but instead I created one PropertyChanged event and fired it in each property when changing (where the event arguments included the property name, old value and new value).
source share