当前位置: 首页>>代码示例>>C#>>正文


C# SerializationInfo.GetValue方法代码示例

本文整理汇总了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)));
 }
开发者ID:Samaed,项目名称:ChickenDodge,代码行数:7,代码来源:GameplayMessage.cs

示例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>));
 }
开发者ID:darrare,项目名称:3100,代码行数:7,代码来源:SaveData.cs

示例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));
 }
开发者ID:RCARL,项目名称:CS380Unity,代码行数:7,代码来源:Resource.cs

示例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));
 }
开发者ID:ChubbRck,项目名称:SFB,代码行数:8,代码来源:SerQuaternion.cs

示例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));
 }
开发者ID:Endevrie,项目名称:Verdant_Story,代码行数:7,代码来源:ProfileSaveData.cs

示例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));
 }
开发者ID:AidinMolavy,项目名称:GrayMan-Prototype,代码行数:8,代码来源:CBahram_SALContainer.cs

示例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));
 }
开发者ID:ragnarok089,项目名称:CS451,代码行数:10,代码来源:SaveData.cs

示例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));
		
	}
开发者ID:vsanchez1987,项目名称:team-ragnarok,代码行数:10,代码来源:Saving.cs

示例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[]));
 }
开发者ID:cjcurrie,项目名称:Pillars,代码行数:8,代码来源:VoxelVolumeData.cs

示例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;
 }
开发者ID:craus,项目名称:UnityTest,代码行数:8,代码来源:Vector2SerializationSurrogate.cs

示例11: SetState

        public void SetState(SerializationInfo info)
        {
            if (info == null)
                throw new ArgumentNullException("info");

            Id = info.GetValue<int>("Id");
            Name = info.GetValue<string>("Name");
        }
开发者ID:mparsin,项目名称:Elements,代码行数:8,代码来源:UserRoleInfo.cs

示例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[]));
 }
开发者ID:syeager,项目名称:Space-CUBEs,代码行数:8,代码来源:CUBEGridInfo.cs

示例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;
 }
开发者ID:craus,项目名称:UnityTest,代码行数:8,代码来源:RaySerializationSurrogate.cs

示例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));
 }
开发者ID:ThomasPlayHaven,项目名称:LaunchProject,代码行数:10,代码来源:FileManager.cs

示例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>));
	}
开发者ID:psaykham,项目名称:ARPandaBox,代码行数:8,代码来源:TransformationInfo.cs


注:本文中的SerializationInfo.GetValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。