예제 #1
0
 public bool getNonExistentProperty(Unit unit, string property)
 {
     try
     {
         return (unit.getProperties(property) == null);
     }
     catch (Exception)
     {
         return false;
     }
 }
예제 #2
0
 public bool getNonExistentProperty(Unit unit, string property)
 {
     try
     {
         return (unit.getProperties(property) == null);
     }
     catch (NullReferenceException ex)
     {
         Console.WriteLine(ex.Message);
         return true;
     }
 }
예제 #3
0
 public bool addExistingProperty(Unit unit, string property, object newValue)
 {
     try
     {
         unit.setProperties(property, newValue);
         unit.setProperties(property, newValue);
         return (unit.getProperties(property) == newValue);
     }
     catch (Exception)
     {
         return false;
     }
 }
예제 #4
0
 public bool changeExistingPropertyValue(Unit unit, string property, object newValue)
 {
     unit.setProperties(property, newValue);
     return (unit.getProperties(property) == newValue);
 }
예제 #5
0
 public bool setGetUnitSpecificProperty(Unit unit, string property, object value)
 {
     unit.setProperties(property, value);
     return (unit.getProperties(property) == value);
 }