public Boolean Add(Gesture g)
 {
     if (!checkDeviceSupportsFeatures(g))
     {
         return false;
     }
     gestures.Add(g);
     gesturesCompleted.Add(false);
     return true;
 }
 public Boolean checkDeviceSupportsFeatures(Gesture g)
 {
     foreach (NuiStreamTypes s in g.getNecessaryStreams())
     {
         object val = ReflectionUtilities.InvokeMethod(device, "supportsStreamType", new object[]{s});
         if (val is bool && (! (bool)val) )
         {
             return false;
         }
     }
     return true;
 }