本文整理汇总了C#中SerializationReader.ReadDouble方法的典型用法代码示例。如果您正苦于以下问题:C# SerializationReader.ReadDouble方法的具体用法?C# SerializationReader.ReadDouble怎么用?C# SerializationReader.ReadDouble使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SerializationReader
的用法示例。
在下文中一共展示了SerializationReader.ReadDouble方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DeserializeUnit
public static Unit DeserializeUnit(SerializationReader reader)
{
var state = reader.ReadOptimizedBitVector32();
var unitType = state[UnitType];
if (unitType == 0) return Unit.Empty;
if (state[UnitIsDoubleValue]) return new Unit(reader.ReadDouble(), (UnitType) unitType);
if (state[UnitIsZeroValue] == 1) return new Unit(0, (UnitType) unitType);
var integerValue = state[UnitIsOptimizedValue] == 1 ? reader.ReadOptimizedInt32() : reader.ReadInt16();
if (state[UnitIsNegativeValue] == 1) integerValue = -integerValue - 1;
return new Unit(integerValue, (UnitType) unitType);
}
示例2: Deserialize
public void Deserialize(SerializationReader reader)
{
strength = reader.ReadDouble();
weight = reader.ReadDouble();
}
示例3: Deserialize
public virtual void Deserialize(SerializationReader reader)
{
arena = (IArena)reader.ReadPointer();
salience = reader.ReadDouble();
}
示例4: Deserialize
private object Deserialize(ref SerializationReader mySerializationReader, DBDouble myValue)
{
myValue._Value = mySerializationReader.ReadDouble();
return myValue;
}
示例5: DeserializeUnit
public static Unit DeserializeUnit(SerializationReader reader)
{
BitVector32 state = reader.ReadOptimizedBitVector32();
int unitType = state[UnitType];
if(unitType == 0)
return System.Web.UI.WebControls.Unit.Empty;
else if(state[UnitIsDoubleValue])
return new Unit(reader.ReadDouble(), (UnitType) unitType);
else if(state[UnitIsZeroValue] == 1)
return new Unit(0, (UnitType) unitType);
else
{
int integerValue = state[UnitIsOptimizedValue] == 1 ? reader.ReadOptimizedInt32() : reader.ReadInt16();
if(state[UnitIsNegativeValue] == 1) integerValue = -integerValue - 1;
return new Unit(integerValue, (UnitType) unitType);
}
}
示例6: Deserialize
public void Deserialize(SerializationReader reader)
{
name = reader.ReadString();
int count = reader.ReadInt32();
senses = new List<KeyValuePair<PhraseSense,double>>(count);
for (int ii = 0; ii < count; ii++)
{
PhraseSense sense = (PhraseSense)reader.ReadPointer();
double weight = reader.ReadDouble();
senses.Add(new KeyValuePair<PhraseSense, double>(sense, weight));
}
}
示例7: Deserialize
public override void Deserialize(SerializationReader reader)
{
coderack = (Coderack) reader.ReadPointer(); // coderack = CType(info.GetValue("coderack", GetType(Coderack)), Coderack)
salience = reader.ReadDouble(); // salience = info.GetDouble("salience")
space = reader.ReadInt32(); // space = info.GetInt32("space")
time = reader.ReadInt32(); // time = info.GetInt32("time")
reader.ReadDictionary(children); // children = CType(info.GetValue("children", GetType(Dictionary(Of String, Codelet))), Dictionary(Of String, Codelet))
watched = reader.ReadBoolean(); // watched = info.GetBoolean("watched")
immune = reader.ReadBoolean(); // immune = info.GetBoolean("immune")
}