Beispiel #1
0
        //works
        public Truck getTruck(int truckId)
        {
            Truck serviceTruck = new Truck();

            if (System.Threading.Monitor.TryEnter(obj3, 45000))
            {
                try
                {
                    serviceTruck.TruckId = truckCtr.getTruck(truckId).truckId;
                    serviceTruck.Status  = truckCtr.getTruck(truckId).status;
                }
                catch (NullReferenceException)
                {
                }
                finally
                {
                    System.Threading.Monitor.Exit(obj3);
                }
            }

            return(serviceTruck);
        }