using System;
using System.Collections.Generic;
namespace LeanCloud {
///
/// 成绩类
///
public class AVStatistic {
///
/// 排行榜名称
///
/// The name.
public string Name {
get; private set;
}
///
/// 成绩值
///
/// The value.
public double Value {
get; private set;
}
///
/// 排行榜版本
///
/// The version.
public int Version {
get; internal set;
}
public AVStatistic(string name, double value) {
Name = name;
Value = value;
}
AVStatistic() { }
internal static AVStatistic Parse(IDictionary data) {
if (data == null) {
throw new ArgumentNullException(nameof(data));
}
AVStatistic statistic = new AVStatistic {
Name = data["statisticName"].ToString(),
Value = double.Parse(data["statisticValue"].ToString()),
Version = int.Parse(data["version"].ToString())
};
return statistic;
}
}
}