Ejemplo n.º 1
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            Parking myPark = Parking.Instance;

            app.UseMvc();

            app.Run(async(context) =>
            {
                await context.Response.WriteAsync("error adress");
            });
        }
Ejemplo n.º 2
0
        public void Delete(int id)
        {
            Parking myPark = Parking.Instance;

            myPark.DeleteCar(id);
        }
Ejemplo n.º 3
0
        public void Post([FromBody] Car temp)
        {
            Parking myPark = Parking.Instance;

            myPark.AddCar(temp);
        }
Ejemplo n.º 4
0
        public Car GetOne(int id)
        {
            Parking myPark = Parking.Instance;

            return(myPark.parkingLot[id]);
        }
Ejemplo n.º 5
0
        public List <Car> GetAll()
        {
            Parking myPark = Parking.Instance;

            return(myPark.parkingLot);
        }
Ejemplo n.º 6
0
        public List <string> GetTransactions()
        {
            Parking myPark = Parking.Instance;

            return(myPark.LogFileInPut());
        }
Ejemplo n.º 7
0
        public int GetBusyPlaces()
        {
            Parking myPark = Parking.Instance;

            return(myPark.parkingLot.Count);
        }
Ejemplo n.º 8
0
        public int GetFreePlaces()
        {
            Parking myPark = Parking.Instance;

            return(Settings.ParkingSpace - myPark.parkingLot.Count);
        }
Ejemplo n.º 9
0
        public double GetMoney()
        {
            Parking myPark = Parking.Instance;

            return(myPark.balance);
        }