本文整理汇总了C#中System.Runtime.Serialization.SerializationInfo.GetDouble方法的典型用法代码示例。如果您正苦于以下问题:C# SerializationInfo.GetDouble方法的具体用法?C# SerializationInfo.GetDouble怎么用?C# SerializationInfo.GetDouble使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Runtime.Serialization.SerializationInfo
的用法示例。
在下文中一共展示了SerializationInfo.GetDouble方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Spheroid
private Spheroid(SerializationInfo info, StreamingContext context)
{
this.Axis = info.GetDouble("Axis");
this.Flatten = info.GetDouble("Flatten");
this.Name = info.GetString("Name");
this.Type = (SpheroidType)info.GetValue("Type", typeof(SpheroidType));
}
示例2: CCDMatrix
public CCDMatrix(SerializationInfo info, StreamingContext context)
{
m_CellX = info.GetDouble("m_CellX");
m_CellY = info.GetDouble("m_CellY");
m_Width = info.GetInt32("m_Width");
m_Height = info.GetInt32("m_Height");
}
示例3: AstroPlate
public AstroPlate(SerializationInfo info, StreamingContext context)
{
m_ImageWidth = info.GetInt32("m_ImageWidth");
m_ImageHeight = info.GetInt32("m_ImageHeight");
m_MatrixToImageScaleX = info.GetDouble("m_MatrixToImageScaleX");
m_MatrixToImageScaleY = info.GetDouble("m_MatrixToImageScaleY");
EffectiveFocalLength = info.GetDouble("EffectiveFocalLength");
EffectivePixelWidth = info.GetDouble("EffectivePixelWidth");
EffectivePixelHeight = info.GetDouble("EffectivePixelHeight");
byte[] data = (byte[])info.GetValue("m_Matrix", typeof(byte[]));
BinaryFormatter fmt = new BinaryFormatter();
using (MemoryStream mem = new MemoryStream(data))
{
m_Matrix = (CCDMatrix)fmt.Deserialize(mem);
}
try
{
m_BitPix = info.GetInt32("m_BitPix");
}
catch
{
m_BitPix = 8;
}
}
示例4: AbstractFunction
/// <summary>
/// Deserialization Constructor
/// </summary>
/// <param name="info">
/// Serialization information to deserialize and obtain the data
/// </param>
/// <param name="context">
/// Serialization context to use
/// </param>
/// <exception cref="ArgumentNullException">
/// if <c>info</c> is <c>null</c>
/// </exception>
public AbstractFunction(SerializationInfo info, StreamingContext context)
{
Helper.ValidateNotNull(info, "info");
this.initialLearningRate = info.GetDouble("initialLearningRate");
this.finalLearningRate = info.GetDouble("finalLearningRate");
}
示例5: CircularLineTerminal
protected CircularLineTerminal(SerializationInfo info, StreamingContext context)
: base(info, context)
{
_scaleX = info.GetDouble ("Scale-X");
_scaleY = info.GetDouble ("Scale-Y");
_radius = info.GetDouble ("Radius");
}
示例6: ConfigDoR
public ConfigDoR(SerializationInfo info, StreamingContext context)
{
minX = info.GetDouble("minX");
maxX = info.GetDouble("maxX");
minY = info.GetDouble("minY");
maxY = info.GetDouble("maxY");
}
示例7: SetObjectData
public object SetObjectData (object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector selector) {
PointD point = (PointD) obj;
point.X = info.GetDouble ("Cairo.PointD.X");
point.Y = info.GetDouble ("Cairo.PointD.Y");
return point;
}
示例8: ConfigDoI
public ConfigDoI(SerializationInfo info, StreamingContext context)
{
minX = info.GetDouble("minX");
maxX = info.GetDouble("maxX");
minY = info.GetDouble("minY");
maxY = info.GetDouble("maxY");
relevantComponents = (List<string>)info.GetValue("relevantComponents", typeof(List<string>));
}
示例9: SetObjectData
public object SetObjectData(object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector selector)
{
Utility.SetPropertyValue(ref obj, "MinX", BindingFlags.Public | BindingFlags.Instance, info.GetDouble("minX"));
Utility.SetPropertyValue(ref obj, "MaxX", BindingFlags.Public | BindingFlags.Instance, info.GetDouble("maxX"));
Utility.SetPropertyValue(ref obj, "MinY", BindingFlags.Public | BindingFlags.Instance, info.GetDouble("minY"));
Utility.SetPropertyValue(ref obj, "MaxY", BindingFlags.Public | BindingFlags.Instance, info.GetDouble("maxY"));
return obj;
}
示例10: ConfigurationCell
/// <summary>
/// Creates a new <see cref="ConfigurationCell"/> from serialization parameters.
/// </summary>
/// <param name="info">The <see cref="SerializationInfo"/> with populated with data.</param>
/// <param name="context">The source <see cref="StreamingContext"/> for this deserialization.</param>
protected ConfigurationCell(SerializationInfo info, StreamingContext context)
: base(info, context)
{
// Deserialize configuration cell
m_timeOffset = info.GetInt64("timeOffset");
m_longitude = info.GetDouble("longitude");
m_latitude = info.GetDouble("latitude");
m_numberOfSatellites = info.GetInt32("numberOfSatellites");
}
示例11: SetObjectData
public object SetObjectData (object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector selector) {
Color color = (Color) obj;
color.A = info.GetDouble ("Cairo.Color.A");
color.R = info.GetDouble ("Cairo.Color.R");
color.G = info.GetDouble ("Cairo.Color.G");
color.B = info.GetDouble ("Cairo.Color.B");
return color;
}
示例12: Network
/// <summary>
/// Initializes a new instance of the <see cref="Network" /> class. Used by the Serializer
/// </summary>
/// <param name='info'>
/// Info.
/// </param>
/// <param name='context'>
/// Context.
/// </param>
public Network(SerializationInfo info, StreamingContext context)
{
_LearningRate = 0;
_CurrentLayers = (List<Base>) info.GetValue("CurrentLayers", typeof (List<Base>));
_LearningRate = info.GetDouble("_LearningRate");
_Momenum = info.GetDouble("_Momenum");
_LastIssuedLayerID = info.GetInt32("_LastIssuedLayerID");
_DetectedBottomLayers = (List<Base>) info.GetValue("_DetectedBottomLayers", typeof (List<Base>));
_DetectedTopLayers = (List<Base>) info.GetValue("_DetectedTopLayers", typeof (List<Base>));
}
示例13: RoutineFixtureReferencePoint
public RoutineFixtureReferencePoint(SerializationInfo info, StreamingContext ctxt)
{
_name = info.GetString("_name");
double ellX = info.GetDouble("_ellipseX");
double ellY = info.GetDouble("_ellipseY");
CreateEllipse(ellX, ellY);
CreateLabel(info.GetString("_labelContent"), ellX,ellY);
_parent = (RoutineFixture)info.GetValue("_parent", typeof(RoutineFixture));
_visible = info.GetBoolean("_visible");
}
示例14: SimpleTextFigure
protected SimpleTextFigure (SerializationInfo info, StreamingContext context) : base (info, context) {
FontColor = (Cairo.Color) info.GetValue ("FontColor", typeof (Cairo.Color));
FontAlignment = (Pango.Alignment) info.GetValue ("FontAlignment", typeof (Pango.Alignment));
FontFamily = (string) info.GetValue ("FontFamily", typeof (string));
FontSize = info.GetInt32 ("FontSize");
FontStyle = (Pango.Style) info.GetValue ("FontStyle", typeof (Pango.Style));
_displayBox = (RectangleD) info.GetValue ("DisplayBox", typeof (RectangleD));
_text = (string) info.GetValue ("Text", typeof (string));
_textEditable = info.GetBoolean ("TextEditable");
_paddingLeft = info.GetDouble ("PaddingLeft");
_paddingTop = info.GetDouble ("PaddingTop");
_paddingRight = info.GetDouble ("PaddingRight");
_paddingBottom = info.GetDouble ("PaddingBottom");
}
示例15: Settings
public Settings(SerializationInfo info, StreamingContext ctxt)
{
ProfileName = (string) info.GetValue("profilename", typeof (string));
MarginThreshold = (double) info.GetValue("marginthreshold", typeof (double));
MinimumThreshold = (double) info.GetValue("minimumthreshold", typeof (double));
Accounting = (int) info.GetValue("accounting", typeof (int));
BrokerRelations = (int) info.GetValue("brokerrelations", typeof (int));
FactionStanding = (double) info.GetValue("factionstanding", typeof (double));
CorpStanding = (double) info.GetValue("corpstanding", typeof (double));
AdvancedStepSettings = info.GetBoolean("advancedstepsettings");
BuyPercentage = info.GetDouble("buypercentage");
BuyThreshold = info.GetDouble("buythreshold");
SellPercentage = info.GetDouble("sellpercentage");
SellThreshold = info.GetDouble("sellthreshold");
}