Ejemplo n.º 1
0
        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);
            }
        }
Ejemplo n.º 2
0
 public pActorType(string owner, string id)
 {
     this.owner = owner;
     this.id = id;
     this.region = null;
 }
Ejemplo n.º 3
0
 public pActorType(string owner, string id, pScoringLocationType region)
 {
     this.owner = owner;
     this.id = id;
     this.region = region;
 }
Ejemplo n.º 4
0
        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);
            }
        }