using DelftTools.Utils.Aop; namespace DelftTools.Utils { [Entity(FireOnCollectionChange = false)] public abstract class TextDocumentBase : INameable { private readonly bool readOnly; /// /// Initializes a new instance of the class where /// is false. /// public TextDocumentBase() : this(false) { } /// /// Initializes a new instance of the class. /// /// Set the value of to this value. public TextDocumentBase(bool isReadOnly) { readOnly = isReadOnly; } /// /// Indicates if can be modified or not. /// public virtual bool ReadOnly { get { return readOnly; } } public virtual string Name { get; set; } //don't use ReadOnly it messes up data binding //[ReadOnly(true)] /// /// Gets or sets the text document contents. /// public virtual string Content { get; set; } public override string ToString() { return Name; } } }