本文整理汇总了C#中System.Xml.XmlReader.ReadAttrAsFloat方法的典型用法代码示例。如果您正苦于以下问题:C# XmlReader.ReadAttrAsFloat方法的具体用法?C# XmlReader.ReadAttrAsFloat怎么用?C# XmlReader.ReadAttrAsFloat使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Xml.XmlReader
的用法示例。
在下文中一共展示了XmlReader.ReadAttrAsFloat方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ReadXml
public override void ReadXml(XmlReader reader)
{
this.Points = reader.ReadAttrAsFloat("Points", 0);
this.DamageSpecified = reader.ReadAttrAsFloat("Damage", ref this.Damage);
base.ReadXml(reader);
}
示例2: ReadXml
public override void ReadXml(XmlReader reader)
{
reader.ReadAttrAsString("Name", ref this.Name);
reader.ReadAttrAsString("File", ref this.File);
reader.ReadAttrAsInt("BombCount", ref this.BombCount);
reader.ReadAttrAsFloat("HeroHealth", ref this.HeroHealth);
reader.ReadAttrAsString("ExplosionClass", ref this.ExplosionClass);
reader.ReadAttrAsFloat("StarScoreRatio1", ref this.StarScoreRatio1);
reader.ReadAttrAsFloat("StarScoreRatio2", ref this.StarScoreRatio2);
reader.ReadAttrAsFloat("StarScoreRatio3", ref this.StarScoreRatio3);
reader.ReadAttrAsFloat("TimeBonusThreshold", ref this.TimeBonusThreshold);
reader.ReadAttrAsFloat("HealthBonusThreshold", ref this.HealthBonusThreshold);
reader.ReadAttrAsFloat("TimeBonusRatio", ref this.TimeBonusRatio);
reader.ReadAttrAsFloat("TimeExtraBonusRatio", ref this.TimeExtraBonusRatio);
reader.ReadAttrAsFloat("HealthBonusRatio", ref this.HealthBonusRatio);
base.ReadXml(reader);
if (string.IsNullOrEmpty(this.Name))
this.Name = this.Id;
}
示例3: ReadXml
public override void ReadXml(XmlReader reader)
{
this.Id = reader["Id"];
reader.ReadAttrAsFloat("AvailablePoints", ref availablePoints);
reader.ReadAttrAsFloat("Score", ref score);
reader.ReadAttrAsFloat("Time", ref time);
reader.ReadAttrAsFloat("Health", ref health);
}