private RDomProperty(string name, AccessModifier declaredAccessModifier = AccessModifier.Private, bool isAbstract = false, bool isVirtual = false, bool isOverride = false, bool isSealed = false, bool isStatic = false, bool isNew = false, bool isWriteOnly = false, bool isReadOnly = false) : base() { Initialize(); Name = name; DeclaredAccessModifier = declaredAccessModifier; // Must use the setter here! IsAbstract = isAbstract; IsVirtual = isVirtual; IsOverride = isOverride; IsSealed = isSealed; IsStatic = isStatic; IsNew = isNew; if (!isReadOnly) { var accesor = new RDomPropertyAccessor(this, AccessorType.Set); SetAccessor = accesor; } if (!isWriteOnly) { var accesor = new RDomPropertyAccessor(this, AccessorType.Get); GetAccessor = accesor; } }
internal RDomPropertyAccessor(RDomPropertyAccessor oldRDom) : base(oldRDom) { Initialize(); Attributes.AddOrMoveAttributeRange(oldRDom.Attributes.Select(x => x.Copy())); _statements = oldRDom.StatementsAll.Copy(this); _name = oldRDom.Name; _accessModifier = oldRDom.AccessModifier; _declaredAccessModifier = oldRDom.DeclaredAccessModifier; _hasBlock = oldRDom.HasBlock; _accessorType = oldRDom.AccessorType; }