/// <summary> /// Constructs a new instance of the NumberDomainBytesExceededException class with serialized data. /// </summary> /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param> /// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param> /// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is null. </exception> /// <exception cref="T:System.Runtime.Serialization.SerializationException">The class name is null or <see cref="P:System.Exception.HResult" /> is zero (0). </exception> protected NumberDomainBytesExceededException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { if (info != null) { this.BoxUsage = info.GetSingle("BoxUsage"); } }
private Capsule(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { _start = new Vector3(info.GetSingle("start.x"), info.GetSingle("start.y"), info.GetSingle("start.z")); _end = new Vector3(info.GetSingle("end.x"), info.GetSingle("end.y"), info.GetSingle("end.z")); _rad = info.GetSingle("radius"); }
private AABBox(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { _center = new Vector3(info.GetSingle("center.x"), info.GetSingle("center.y"), info.GetSingle("center.z")); _size = new Vector3(info.GetSingle("size.x"), info.GetSingle("size.y"), info.GetSingle("size.z")); }
public override object SetObjectData(object obj,System.Runtime.Serialization.SerializationInfo info,System.Runtime.Serialization.StreamingContext context,System.Runtime.Serialization.ISurrogateSelector selector) { base.SetObjectData(obj, info, context, selector); _text = info.GetString("Text"); _font = (Font)info.GetValue("Font", typeof(Font)); _textBrush = (BrushX)info.GetValue("Brush", typeof(BrushX)); _background = (IBackgroundStyle)info.GetValue("BackgroundStyle", typeof(IBackgroundStyle)); _lineSpacingFactor = info.GetSingle("LineSpacing"); _xAnchorType = (XAnchorPositionType)info.GetValue("XAnchor", typeof(XAnchorPositionType)); _yAnchorType = (YAnchorPositionType)info.GetValue("YAnchor", typeof(YAnchorPositionType)); return this; }
/// <summary> /// Deserializes the axis style (version 0). /// </summary> /// <param name="obj">The empty axis object to deserialize into.</param> /// <param name="info">The serialization info.</param> /// <param name="context">The streaming context.</param> /// <param name="selector">The deserialization surrogate selector.</param> /// <returns>The deserialized linear axis.</returns> public object SetObjectData(object obj,System.Runtime.Serialization.SerializationInfo info,System.Runtime.Serialization.StreamingContext context,System.Runtime.Serialization.ISurrogateSelector selector) { AxisLineStyle s = (AxisLineStyle)obj; s._axisPen = (PenX)info.GetValue("AxisPen",typeof(PenX)); s._majorTickPen = (PenX)info.GetValue("MajorPen",typeof(PenX)); s._minorTickPen = (PenX)info.GetValue("MinorPen",typeof(PenX)); s._majorTickLength = (float)info.GetSingle("MajorLength"); s._minorTickLength = (float)info.GetSingle("MinorLength"); s._showFirstUpMajorTicks = (bool)info.GetBoolean("MajorRight"); s._showFirstDownMajorTicks = (bool)info.GetBoolean("MajorLeft"); s._showFirstUpMinorTicks = (bool)info.GetBoolean("MinorRight"); s._showFirstDownMinorTicks = (bool)info.GetBoolean("MinorLeft"); s._axisPosition = (Calc.RelativeOrAbsoluteValue)info.GetValue("AxisPosition",typeof(Calc.RelativeOrAbsoluteValue)); return s; }
public object SetObjectData(object obj, System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context, System.Runtime.Serialization.ISurrogateSelector selector) { string name = info.GetString("Name"); float size = info.GetSingle("Size"); this.CopyFrom(new LineCapEx(name,size)); return this; } // end of SetObjectData
public object SetObjectData(object obj,System.Runtime.Serialization.SerializationInfo info,System.Runtime.Serialization.StreamingContext context,System.Runtime.Serialization.ISurrogateSelector selector) { ColumnStyle s = (ColumnStyle)obj; s.m_Size = (int)info.GetSingle("Size"); s.m_CellPen = (PenX)info.GetValue("Pen",typeof(PenX)); s.m_TextBrush = (BrushX)info.GetValue("TextBrush",typeof(BrushX)); s.m_BackgroundBrush = (BrushX)info.GetValue("BkgBrush",typeof(BrushX)); s.m_TextFormat = new StringFormat(); s.m_TextFormat.Alignment = (StringAlignment)info.GetValue("Alignment",typeof(StringAlignment)); // Deserialising a font with SoapFormatter raises an error at least in Net1SP2, so I had to circuumvent this s.m_TextFont = (Font)info.GetValue("Font",typeof(Font)); // s.m_TextFont = new Font("Arial",8); return s; }
/// <summary> /// Constructs a new instance of the AttributeDoesNotExistException class with serialized data. /// </summary> /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param> /// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param> /// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is null. </exception> /// <exception cref="T:System.Runtime.Serialization.SerializationException">The class name is null or <see cref="P:System.Exception.HResult" /> is zero (0). </exception> protected AttributeDoesNotExistException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { if (info != null) { this.BoxUsage = info.GetSingle("BoxUsage"); } }
/// <summary> /// Deserializes the A2DPlotScatterStyle Version 0. /// </summary> /// <param name="obj">The empty A2DPlotScatterStyle object to deserialize into.</param> /// <param name="info">The serialization info.</param> /// <param name="context">The streaming context.</param> /// <param name="selector">The deserialization surrogate selector.</param> /// <returns>The deserialized A2DPlotScatterStyle.</returns> public object SetObjectData(object obj, System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context, System.Runtime.Serialization.ISurrogateSelector selector) { ScatterPlotStyle s = (ScatterPlotStyle)obj; s._shape = (XYPlotScatterStyles.Shape)info.GetValue("Shape", typeof(XYPlotScatterStyles.Shape)); s._style = (XYPlotScatterStyles.Style)info.GetValue("Style", typeof(XYPlotScatterStyles.Style)); s._dropLine = (CSPlaneIDList)info.GetValue("DropLine", typeof(List<CSPlaneID>)); s._pen = (PenX)info.GetValue("Pen", typeof(PenX)); s._symbolSize = info.GetSingle("SymbolSize"); s._relativePenWidth = info.GetSingle("RelativePenWidth"); return s; }
/// <summary> /// Constructs a new instance of the InvalidParameterValueException class with serialized data. /// </summary> /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param> /// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param> /// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is null. </exception> /// <exception cref="T:System.Runtime.Serialization.SerializationException">The class name is null or <see cref="P:System.Exception.HResult" /> is zero (0). </exception> protected InvalidParameterValueException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { if (info != null) { this.BoxUsage = info.GetSingle("BoxUsage"); } }
public virtual object SetObjectData(object obj,System.Runtime.Serialization.SerializationInfo info,System.Runtime.Serialization.StreamingContext context,System.Runtime.Serialization.ISurrogateSelector selector) { _position = (PointF)info.GetValue("Position", typeof(PointF)); _bounds = (RectangleF)info.GetValue("Bounds", typeof(RectangleF)); _rotation = info.GetSingle("Rotation"); _autoSize = info.GetBoolean("AutoSize"); return this; }
private Sphere(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { _cent = new Vector3(info.GetSingle("center.x"), info.GetSingle("center.y"), info.GetSingle("center.z")); _rad = info.GetSingle("radius"); }
/// <summary> /// Deserializes the GraphController (version 0). /// </summary> /// <param name="obj">The empty GraphController object to deserialize into.</param> /// <param name="info">The serialization info.</param> /// <param name="context">The streaming context.</param> /// <param name="selector">The deserialization surrogate selector.</param> /// <returns>The deserialized GraphController.</returns> public object SetObjectData(object obj,System.Runtime.Serialization.SerializationInfo info,System.Runtime.Serialization.StreamingContext context,System.Runtime.Serialization.ISurrogateSelector selector) { GraphController s = (GraphController)obj; s.SetMemberVariablesToDefault(); s.m_AutoZoom = info.GetBoolean("AutoZoom"); s.m_Zoom = info.GetSingle("Zoom"); s.m_Graph = (GraphDocument)info.GetValue("Graph",typeof(GraphDocument)); s.m_DeserializationSurrogate = this; return s; }
private Box(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { _center = new Vector3(info.GetSingle("center.x"), info.GetSingle("center.y"), info.GetSingle("center.z")); _size = new Vector3(info.GetSingle("size.x"), info.GetSingle("size.y"), info.GetSingle("size.z")); var euler = new Vector3(info.GetSingle("rot.x"), info.GetSingle("rot.y"), info.GetSingle("rot.z")); _orientation = Quaternion.Euler(euler); }
/// <summary> /// Deserializes the XYPlotLayer Version 0. /// </summary> /// <param name="obj">The empty XYPlotLayer object to deserialize into.</param> /// <param name="info">The serialization info.</param> /// <param name="context">The streaming context.</param> /// <param name="selector">The deserialization surrogate selector.</param> /// <returns>The deserialized XYPlotLayer.</returns> public object SetObjectData(object obj, System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context, System.Runtime.Serialization.ISurrogateSelector selector) { XYPlotLayer s = (XYPlotLayer)obj; // XYPlotLayer style bool fillLayerArea = info.GetBoolean("FillLayerArea"); BrushX layerAreaFillBrush = (BrushX)info.GetValue("LayerAreaFillBrush", typeof(BrushX)); // size, position, rotation and scale s._location.WidthType = (XYPlotLayerSizeType)info.GetValue("WidthType", typeof(XYPlotLayerSizeType)); s._location.HeightType = (XYPlotLayerSizeType)info.GetValue("HeightType", typeof(XYPlotLayerSizeType)); s._location.Width = info.GetDouble("Width"); s._location.Height = info.GetDouble("Height"); s._cachedLayerSize = (SizeF)info.GetValue("CachedSize", typeof(SizeF)); s._location.XPositionType = (XYPlotLayerPositionType)info.GetValue("XPositionType", typeof(XYPlotLayerPositionType)); s._location.YPositionType = (XYPlotLayerPositionType)info.GetValue("YPositionType", typeof(XYPlotLayerPositionType)); s._location.XPosition = info.GetDouble("XPosition"); s._location.YPosition = info.GetDouble("YPosition"); s._cachedLayerPosition = (PointF)info.GetValue("CachedPosition", typeof(PointF)); s._location.Angle = info.GetSingle("Rotation"); s._location.Scale = info.GetSingle("Scale"); // axis related s._linkedScales.X.Scale = (Scale)info.GetValue("XAxis", typeof(Scale)); s._linkedScales.Y.Scale = (Scale)info.GetValue("YAxis", typeof(Scale)); s.LinkedScales.X.IsLinked = info.GetBoolean("LinkXAxis"); s.LinkedScales.Y.IsLinked = info.GetBoolean("LinkYAxis"); s.LinkedScales.X.LinkOrgA = info.GetDouble("LinkXAxisOrgA"); s.LinkedScales.X.LinkOrgB = info.GetDouble("LinkXAxisOrgB"); s.LinkedScales.X.LinkEndA = info.GetDouble("LinkXAxisEndA"); s.LinkedScales.X.LinkEndB = info.GetDouble("LinkXAxisEndB"); s.LinkedScales.Y.LinkOrgA = info.GetDouble("LinkYAxisOrgA"); s.LinkedScales.Y.LinkOrgB = info.GetDouble("LinkYAxisOrgB"); s.LinkedScales.Y.LinkEndA = info.GetDouble("LinkYAxisEndA"); s.LinkedScales.Y.LinkEndB = info.GetDouble("LinkYAxisEndB"); // Styles bool showLeft = info.GetBoolean("ShowLeftAxis"); bool showBottom = info.GetBoolean("ShowBottomAxis"); bool showRight = info.GetBoolean("ShowRightAxis"); bool showTop = info.GetBoolean("ShowTopAxis"); s._axisStyles.AxisStyleEnsured(CSLineID.Y0).AxisLineStyle = (AxisLineStyle)info.GetValue("LeftAxisStyle", typeof(AxisLineStyle)); s._axisStyles.AxisStyleEnsured(CSLineID.X0).AxisLineStyle = (AxisLineStyle)info.GetValue("BottomAxisStyle", typeof(AxisLineStyle)); s._axisStyles.AxisStyleEnsured(CSLineID.Y1).AxisLineStyle = (AxisLineStyle)info.GetValue("RightAxisStyle", typeof(AxisLineStyle)); s._axisStyles.AxisStyleEnsured(CSLineID.X1).AxisLineStyle = (AxisLineStyle)info.GetValue("TopAxisStyle", typeof(AxisLineStyle)); s._axisStyles[CSLineID.Y0].MajorLabelStyle = (AxisLabelStyleBase)info.GetValue("LeftLabelStyle", typeof(AxisLabelStyleBase)); s._axisStyles[CSLineID.X0].MajorLabelStyle = (AxisLabelStyleBase)info.GetValue("BottomLabelStyle", typeof(AxisLabelStyleBase)); s._axisStyles[CSLineID.Y1].MajorLabelStyle = (AxisLabelStyleBase)info.GetValue("RightLabelStyle", typeof(AxisLabelStyleBase)); s._axisStyles[CSLineID.X1].MajorLabelStyle = (AxisLabelStyleBase)info.GetValue("TopLabelStyle", typeof(AxisLabelStyleBase)); // Titles and legend s._axisStyles[CSLineID.Y0].Title = (TextGraphic)info.GetValue("LeftAxisTitle", typeof(TextGraphic)); s._axisStyles[CSLineID.X0].Title = (TextGraphic)info.GetValue("BottomAxisTitle", typeof(TextGraphic)); s._axisStyles[CSLineID.Y1].Title = (TextGraphic)info.GetValue("RightAxisTitle", typeof(TextGraphic)); s._axisStyles[CSLineID.X1].Title = (TextGraphic)info.GetValue("TopAxisTitle", typeof(TextGraphic)); if (!showLeft) s._axisStyles.Remove(CSLineID.Y0); if (!showRight) s._axisStyles.Remove(CSLineID.Y1); if (!showBottom) s._axisStyles.Remove(CSLineID.X0); if (!showTop) s._axisStyles.Remove(CSLineID.X1); s.Legend = (TextGraphic)info.GetValue("Legend", typeof(TextGraphic)); // XYPlotLayer specific s._linkedLayer.SetDocNode((XYPlotLayer)info.GetValue("LinkedLayer", typeof(XYPlotLayer)), s); s._graphObjects = (GraphicCollection)info.GetValue("GraphObjects", typeof(GraphicCollection)); s._plotItems = (PlotItemCollection)info.GetValue("Plots", typeof(PlotItemCollection)); return s; }
/// <summary> /// Constructs a new instance of the DuplicateItemNameException class with serialized data. /// </summary> /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param> /// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param> /// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is null. </exception> /// <exception cref="T:System.Runtime.Serialization.SerializationException">The class name is null or <see cref="P:System.Exception.HResult" /> is zero (0). </exception> protected DuplicateItemNameException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { if (info != null) { this.BoxUsage = info.GetSingle("BoxUsage"); } }
/// <summary> /// Constructs a new instance of the RequestTimeoutException class with serialized data. /// </summary> /// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown.</param> /// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination.</param> /// <exception cref="T:System.ArgumentNullException">The <paramref name="info" /> parameter is null. </exception> /// <exception cref="T:System.Runtime.Serialization.SerializationException">The class name is null or <see cref="P:System.Exception.HResult" /> is zero (0). </exception> protected RequestTimeoutException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) : base(info, context) { if (info != null) { this.BoxUsage = info.GetSingle("BoxUsage"); } }
private VariantReference(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { var mode = (RefMode)info.GetByte("mode"); switch(mode) { case RefMode.Value: _mode = RefMode.Value; _type = (VariantType)info.GetInt32("type"); switch (_type) { case VariantType.Object: case VariantType.Null: this.Value = null; break; case VariantType.String: this.StringValue = info.GetString("value"); break; case VariantType.Boolean: this.BoolValue = info.GetBoolean("value"); break; case VariantType.Integer: this.IntValue = info.GetInt32("value"); break; case VariantType.Float: this.FloatValue = info.GetSingle("value"); break; case VariantType.Double: this.DoubleValue = info.GetDouble("value"); break; case VariantType.Vector2: case VariantType.Vector3: case VariantType.Quaternion: case VariantType.Color: var arr = StringUtil.SplitFixedLength(info.GetString("value"), ",", 4); _x = ConvertUtil.ToSingle(arr[0]); _y = ConvertUtil.ToSingle(arr[1]); _z = ConvertUtil.ToSingle(arr[2]); _w = ConvertUtil.ToDouble(arr[3]); break; case VariantType.DateTime: this.DateValue = info.GetDateTime("value"); break; case VariantType.GameObject: case VariantType.Component: this.Value = null; break; } break; case RefMode.Property: this.Value = null; //just set to null value break; } }