public PropertyBlock(PropertyGetBlock getBlock, PropertySetBlock setBlock) : base() { GetAccessor = getBlock; SetAccessor = setBlock; Init(); }
public PropertyBlock() : base() { GetAccessor = new PropertyGetBlock(); SetAccessor = new PropertySetBlock(); Init(); }
public override void AddChildren(IEnumerable <Block> restoredChildren) { foreach (Block child in restoredChildren) { if (child is PropertyGetBlock) { GetAccessor = child as PropertyGetBlock; } if (child is PropertySetBlock) { SetAccessor = child as PropertySetBlock; } } }
public static ParameterList FindParameters(Block point) { MethodBlock method = FindContainingMethod(point); if (method != null) { return(method.Parameters.Parameters); } PropertySetBlock propAccessor = FindContainingPropertyAccessor(point) as PropertySetBlock; if (propAccessor != null) { return(propAccessor.Parameters); } return(null); }
private void AssignSetAccessor(PropertySetBlock value) { if (value == null && mSetAccessor != null) { if (GetAccessor == null) { this.ReplaceWithField(); } else { BlockActions.DeleteBlock(mSetAccessor); } } else if (mSetAccessor == null && value != null) { this.VMembers.Add(value); } else if (mSetAccessor != null && value != null) { mSetAccessor.Replace(value); } mSetAccessor = value; }