本文整理汇总了C#中SerializationInfo.AddValue方法的典型用法代码示例。如果您正苦于以下问题:C# SerializationInfo.AddValue方法的具体用法?C# SerializationInfo.AddValue怎么用?C# SerializationInfo.AddValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SerializationInfo
的用法示例。
在下文中一共展示了SerializationInfo.AddValue方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetObjectData
public void GetObjectData(SerializationInfo info, StreamingContext ctxt)
{
info.AddValue("object2PropertiesMappings", this.object2PropertiesMappings);
info.AddValue("EZR_VERSION", EZR_VERSION);
info.AddValue("recordingInterval", this.recordingInterval);
//base.GetObjectData(info, context);
}
示例2: GetObjectData
// Serialization funciton.
public void GetObjectData(SerializationInfo info, StreamingContext ctxt)
{
// You can use any name/value pair, as long as you read them with the same names
info.AddValue("Health", health);
info.AddValue("Name", name);
}
示例3: GetObjectData
// Get serialization data.
public override void GetObjectData(SerializationInfo info,
StreamingContext context)
{
base.GetObjectData(info, context);
info.AddValue("filename", filename);
info.AddValue("line", line);
}
示例4: GetObjectData
public void GetObjectData (SerializationInfo info, StreamingContext context) {
info.AddValue ("a", a);
if (s1 != null)
info.AddValue ("s1", s1);
else
info.AddValue ("s1", "(null)");
}
示例5: GetObjectData
public void GetObjectData(System.Object obj, SerializationInfo info, StreamingContext context)
{
Vector3 v3 = (Vector3)obj;
info.AddValue("x", v3.x);
info.AddValue("y", v3.y);
info.AddValue("z", v3.z);
}
示例6: GetObjectData
// Method called to serialize a Vector3 object
public void GetObjectData(System.Object obj, SerializationInfo info, StreamingContext context)
{
Color c = (Color) obj;
info.AddValue("r", c.r);
info.AddValue("g", c.g);
info.AddValue("b", c.b);
}
示例7: typeof
void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
{
info.AddValue ("SourceID", SourceID, typeof(int));
info.AddValue ("DestID", DestID, typeof(int));
info.AddValue ("MessageType", Type, typeof(MessageType));
info.AddValue ("SerializedContent", SerializedContent, typeof(byte[]));
}
示例8: GetObjectData
public void GetObjectData(SerializationInfo info, StreamingContext context) {
info.AddValue ("count", count);
info.AddValue ("weaponCount", weapons.Count);
for (int i = 0; i < weapons.Count; i++) {
info.AddValue ("weaponCD_" + i, weapons [i].GetCooldown ());
}
}
示例9: GetObjectData
// Required by the ISerializable class to be properly serialized. This is called automatically
public void GetObjectData(SerializationInfo info, StreamingContext ctxt)
{
// Repeat this for each var defined in the Values section
info.AddValue("foundGem1", (foundGem1));
info.AddValue("score", score);
info.AddValue("levelReached", levelReached);
}
示例10: GetObjectData
// Required by the ISerializable class to be properly serialized. This is called automatically
public void GetObjectData(SerializationInfo info, StreamingContext ctxt)
{
// Repeat this for each var defined in the Values section
info.AddValue("boardWidth", (boardWidth));
info.AddValue("boardHeight", boardHeight);
info.AddValue("tiles", tiles);
}
示例11: GetObjectData
// Required by the ISerializable class to be properly serialized. This is called automatically
public void GetObjectData(SerializationInfo info, StreamingContext ctxt)
{
// Repeat this for each var defined in the Values section
info.AddValue("ConeUnlocked", (ConeUnlocked));
info.AddValue("HiScore", HiScore);
info.AddValue("ExplosivesLeft", ExplosivesLeft);
}
示例12: GetObjectData
/*[SecurityPermissionAttribute(
SecurityAction.Demand,
SerializationFormatter = true)] */
public void GetObjectData(SerializationInfo info, StreamingContext ctxt)
{
info.AddValue("x", this.x);
info.AddValue("y", this.y);
info.AddValue("z", this.z);
info.AddValue("w", this.w);
}
示例13: GetState
public void GetState(SerializationInfo info)
{
if (info == null)
throw new ArgumentNullException("info");
info.AddValue("Id", Id);
info.AddValue("Name", Name);
}
示例14: GetObjectData
public void GetObjectData(System.Object obj, SerializationInfo info, StreamingContext context)
{
Quaternion q = (Quaternion)obj;
info.AddValue ("x", q.x);
info.AddValue ("y", q.y);
info.AddValue ("z", q.z);
info.AddValue ("w", q.w);
}
示例15: GetObjectData
public void GetObjectData(SerializationInfo info, StreamingContext ctxt)
{
info.AddValue("data", data);
info.AddValue("colors", colors);
info.AddValue("dimensions", dimensions);
info.AddValue("voxelScale", voxelScale);
info.AddValue("centerOffset", centerOffset);
}