Exemplo 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");
            });
        }
Exemplo n.º 2
0
        public void Delete(int id)
        {
            Parking myPark = Parking.Instance;

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

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

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

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

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

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

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

            return(myPark.balance);
        }