----- **Warning: this wiki page is auto-generated by the Arnolyzer solution-build process. Do not directly edit this page, as your changes will be lost on the next commit.** To edit this page, please refer to [Contributing to this project](https://github.com/DavidArno/Arnolyzer/wiki/Contributing.md). These wiki pages reflect the state of the project in development, per the last commit. For details of the latest release of the Arnolyzer Analysers, please see the [Arnolyzer website](http://http://davidarno.github.io/Arnolyzer/). ----- # AA1100 - Interface Properties Should Be Read-Only # **Report code: AA1100-InterfacePropertiesShouldBeReadOnly** ## Summary ##
Status Implemented
Description To provide encapsulation, properties should only make getters publicly available, so interfaces should not define setters for properties.
Category Encapsulation Analyzers
Enabled by default: Yes
Severity: Error
## Cause ## Interface properties should not have setters. Doing so forces implemnting classes to have public setters on those properties and so they become mutable from any other point in the code that has access to the object instance, making it much harder to track changes to the object's state. ## How to fix violations ## There currently aren't any implemented code-fixes for this rule. ## How to suppress violations ## This rule can be suppressed using the following attributes: **[MutableProperty]**
A public setter may sometimes be required. It is therefore allowed if decorated with the MutableProperty attribute as it explicitly asserts the need for the property to be mutable.