public ScoringLocationType(pScoringLocationType s) { for (int i = 0; i < s.Zone.Count; i++) this.zone.Add(s.Zone[i]); if ("Anywhere" == s.Zone[0]) { this.relationship = ScoringDB.ActorInfo.LocationInfo.LocationType.Anywhere; } else if (("InZone" == s.Relationship)||(""==s.Relationship)) { this.relationship = ScoringDB.ActorInfo.LocationInfo.LocationType.InZone; } else if ("NotInZone" == s.Relationship) { this.relationship = ScoringDB.ActorInfo.LocationInfo.LocationType.NotInZone; } else { throw new ApplicationException("Unknown scoring region relationship: " + s.Relationship); } }
public pActorType(string owner, string id) { this.owner = owner; this.id = id; this.region = null; }
public pActorType(string owner, string id, pScoringLocationType region) { this.owner = owner; this.id = id; this.region = region; }
public override pScoringLocationType pGetScoringLocation() { pScoringLocationType returnValue; List<string> zone = new List<string>(); ; string relationship; try { reader.Read(); // ScoringLocation Tag zone = pGetStringList(commaRegex); if ("Relationship" != reader.Name) { returnValue = new pScoringLocationType(zone); } else { relationship = pGetString(); returnValue = new pScoringLocationType(zone, relationship); } reader.ReadEndElement(); return returnValue; } catch (SystemException e) { if (0 == zone.Count) throw new ApplicationException("Error in reading scoring location; zones unknown", e); throw new ApplicationException("Error in reading scoring location involving (first) zone " + zone[0], e); } }