/// <summary> /// This is the complete init method for this class. /// It should be used by the children classes in the constructor in order to correctly fill the properties of the object. /// </summary> /// <param name="id"></param> /// <param name="name"></param> /// <param name="category"></param> /// <param name="threshold"></param> /// <param name="points"></param> protected void Init(short id, string name, RankingActionCategory category, int threshold, short points) { ID = id; Name = name; Category = category; Threshold = threshold; Points = points; }
public override bool Parse(XElement xml) { if (xml == null) { return(false); } short id = 0; string name = string.Empty; RankingActionCategory cat = RankingActionCategory.DirectAction; int threshold = 0; short points = 0; xml.ParseNode("ID", ref id, false); xml.ParseNode("Name", ref name, false); xml.ParseNode <RankingActionCategory>("Category", ref cat, false); xml.ParseNode("Threshold", ref threshold, false); xml.ParseNode("Points", ref points, false); Init(id, name, cat, threshold, points); return(true); }
/// <summary> /// This create a complete RankingAction /// </summary> /// <param name="id"></param> /// <param name="value">Value of the TAG</param> /// -------------------------------------------------------------------------------------------------- protected RankingAction(short id, string name, RankingActionCategory category, int threshold, short points) { Init(id, name, category, threshold, points); }