ReadOnlyAutoProperty Mutator

Mutator that takes an auto-property readonly, i.e. can only be assigned in the constructor and has a readonly backing field.

Example

class Foo {
    [ReadOnly]
    public int Value {get; private set;}
    public Foo(int value) {
        this.Value = value;
    }
}

[AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = false)]
class ReadOnlyAttribute : Attribute { }
class Foo {
    readonly int value; // this field is readonly
    [ReadOnly]
    public int Value {get { return this.value; } } // the setter was removed
    public Foo(int value) {
        this.value = value; // all calls to the setter were replaced by direct access to the field
    }
}

Requirements: