Exemplo n.º 1
0
      private SpeedCameraInfo _fromInput(SpeedCamera inputCamera) {
         var ci = new SpeedCameraInfo();

         ci.CameraId = inputCamera.Id;
         ci.Operator = _getOperatorByRegion(inputCamera.Location);
         ci.Type = inputCamera.Type;
         ci.SpeedLimit = inputCamera.SpeedLimit;
         ci.Direction = inputCamera.Direction;
         ci.Orientation = inputCamera.Orientation;
         ci.Location = inputCamera.Location;
         ci.Distance = inputCamera.Distance;
         ci.DataSource = DataSources.Backend;

         return ci;
      }
Exemplo n.º 2
0
      private bool _isEqual(SpeedCameraInfo ci1, SpeedCameraInfo ci2) {
         if (ci1.CameraId != ci2.CameraId) return false;
         if (ci1.Operator != ci2.Operator) return false;
         if (ci1.Type != ci2.Type) return false;
         if (ci1.SpeedLimit != ci2.SpeedLimit) return false;
         if (ci1.Direction != ci2.Direction) return false;
         if (ci1.Orientation != ci2.Orientation) return false;
         if (ci1.Location != ci2.Location) return false;
         if (ci1.Distance != ci2.Distance) return false;

         return true;
      }