public bool Read(Reader reader, SerializationContext context) { var obj = _PlacementSerializer.Read(reader, null, context); if (obj == null) { return(false); } _Placement = (Win32Api.WINDOWPLACEMENT)obj; return(true); }
public object Read(Reader reader, object obj, SerializationContext context) { var placement = new Win32Api.WINDOWPLACEMENT(); placement.length = Marshal.SizeOf(placement); if (reader.BeginList() && reader.BeginListValue() && int.TryParse(reader.ReadValueString(), out placement.showCmd) && reader.BeginListValue() && _SerializerPOINT.TryRead(reader, context, out placement.maxPosition) && reader.BeginListValue() && _SerializerPOINT.TryRead(reader, context, out placement.minPosition) && reader.BeginListValue() && _SerializerRECT.TryRead(reader, context, out placement.normalPosition) && reader.EndList()) { return(placement); } return(null); }