本文整理汇总了C#中SerializationInfo.GetValue方法的典型用法代码示例。如果您正苦于以下问题:C# SerializationInfo.GetValue方法的具体用法?C# SerializationInfo.GetValue怎么用?C# SerializationInfo.GetValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SerializationInfo
的用法示例。
在下文中一共展示了SerializationInfo.GetValue方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GameplayMessage
public GameplayMessage(SerializationInfo info, StreamingContext context)
{
Message = (MessageValue)info.GetByte ("Message");
PlayerID = info.GetInt32 ("PlayerID");
MoveDelta = new Vector2((float)info.GetValue("x",typeof(float)),(float)info.GetValue("y",typeof(float)));
OldPosition = new Vector3((float)info.GetValue("xloc", typeof(float)), (float)info.GetValue("yloc", typeof(float)), (float)info.GetValue("zloc", typeof(float)));
}
示例2: SaveData
public SaveData(SerializationInfo info, StreamingContext ctxt)
{
mapName = (string)info.GetValue ("mapName", typeof(string));
playerLocation = (float[])info.GetValue ("playerLocation", typeof(float[]));
activeQuests = (List<Quest>)info.GetValue ("activeQuests", typeof(List<Quest>));
completedQuests = (List<Quest>)info.GetValue ("completedQuests", typeof(List<Quest>));
}
示例3: Resource
public Resource(SerializationInfo info, StreamingContext context)
: base(1,(string) info.GetValue("type", typeof(string)), null, (string) info.GetValue("description", typeof(string)), null)
{
// Reset the property value using the GetValue method.
tier = (int) info.GetValue("tier", typeof(int));
use = (int) info.GetValue ("use", typeof(int));
}
示例4: SerQuaternion
//serialization constructor
protected SerQuaternion(SerializationInfo info,StreamingContext context)
{
x = (float)info.GetValue("x",typeof(float));
y = (float)info.GetValue("y",typeof(float));
z = (float)info.GetValue("z",typeof(float));
w = (float)info.GetValue("w",typeof(float));
}
示例5: ProfileSaveData
public ProfileSaveData(SerializationInfo aInfo, StreamingContext aContext)
: base()
{
m_Name = (string)aInfo.GetValue("Name", typeof(string));
m_ProfileName = (string)aInfo.GetValue("ProfileName", typeof(string));
m_ProgressionLevel = (int)aInfo.GetValue("ProgressionLevel", typeof(int));
}
示例6: CBahram_SALContainer
//Serializatoin counstructor. call when Deserialize function called.
public CBahram_SALContainer(SerializationInfo info, StreamingContext context)
{
var1 = (int)info.GetValue("var1",typeof(int));
var2 = (int)info.GetValue("var2",typeof(int));
var3 = (int)info.GetValue("var3",typeof(int));
var4 = (int)info.GetValue("var4",typeof(int));
}
示例7: SaveData
// This constructor is called automatically by the parent class, ISerializable
// We get to custom-implement the serialization process here
public SaveData(SerializationInfo info, StreamingContext ctxt)
{
// Get the values from info and assign them to the appropriate properties. Make sure to cast each variable.
// Do this for each var defined in the Values section above
boardWidth = (int)info.GetValue ("boardWidth", typeof(int));
boardHeight = (int)info.GetValue ("boardHeight", typeof(int));
tiles = (Tile[])info.GetValue("tiles", typeof(Tile));
}
示例8: Saving
// deserialized constructor
public Saving(SerializationInfo info, StreamingContext ctxt)
{
// get the values from info and assign them to the appropriate properties
health = (int)info.GetValue("Health", typeof(int));
name = (string)info.GetValue("Name", typeof(string));
}
示例9: VoxelVolumeData
public VoxelVolumeData(SerializationInfo info, StreamingContext ctxt)
{
data = (byte[])info.GetValue("data", typeof(byte[]));
colors = (float[,])info.GetValue("colors", typeof(float[,]));
dimensions = (ushort[])info.GetValue("dimensions", typeof(ushort[]));
voxelScale = (float)info.GetValue("voxelScale", typeof(float));
centerOffset = (int[])info.GetValue("centerOffset", typeof(int[]));
}
示例10: SetObjectData
public System.Object SetObjectData(System.Object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector selector)
{
Vector2 v2 = (Vector2)obj;
v2.x = (float)info.GetValue("x", typeof(float));
v2.y = (float)info.GetValue("y", typeof(float));
obj = v2;
return obj;
}
示例11: SetState
public void SetState(SerializationInfo info)
{
if (info == null)
throw new ArgumentNullException("info");
Id = info.GetValue<int>("Id");
Name = info.GetValue<string>("Name");
}
示例12: CUBEGridInfo
public CUBEGridInfo(SerializationInfo info, StreamingContext context)
{
position = (sVector3)info.GetValue("position", typeof(sVector3));
rotation = (sVector3)info.GetValue("rotation", typeof(sVector3));
weaponMap = info.GetInt32("weaponMap");
augmentationMap = info.GetInt32("augmentationMap");
colors = (int[])info.GetValue("colors", typeof(int[]));
}
示例13: SetObjectData
public System.Object SetObjectData(System.Object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector selector)
{
Ray ray = (Ray)obj;
ray.origin = (Vector3)info.GetValue("origin", typeof(Vector3));
ray.direction = (Vector3)info.GetValue("direction", typeof(Vector3));
obj = ray;
return obj;
}
示例14: SaveData
// This constructor is called automatically by the parent class, ISerializable
// We get to custom-implement the serialization process here
public SaveData(SerializationInfo info, StreamingContext ctxt)
{
// Get the values from info and assign them to the appropriate properties. Make sure to cast each variable.
// Do this for each var defined in the Values section above
ConeUnlocked = (bool)info.GetValue("ConeUnlocked", typeof(bool));
HiScore = (int)info.GetValue("HiScore", typeof(int));
ExplosivesLeft = (int)info.GetValue("ExplosivesLeft", typeof(int));
}
示例15: TransformationInfo
public TransformationInfo(SerializationInfo info, StreamingContext ctxt)
{
Show = (bool)info.GetValue("Show", typeof(bool));
Transformation = (SpriteAnimation.TransformationType)info.GetValue("Transformation", typeof(SpriteAnimation.TransformationType));
NormalEasing = (EZAnimation.EASING_TYPE)info.GetValue("NormalEasing", typeof(EZAnimation.EASING_TYPE));
ReverseEasing = (EZAnimation.EASING_TYPE)info.GetValue("ReverseEasing", typeof(EZAnimation.EASING_TYPE));
TransformationKeyList = (List<TransformationKeyInfo>)info.GetValue("AnimationKeyList", typeof(List<TransformationKeyInfo>));
}