CarRentalGridForm.Models
1.0.1
dotnet add package CarRentalGridForm.Models --version 1.0.1
NuGet\Install-Package CarRentalGridForm.Models -Version 1.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CarRentalGridForm.Models" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CarRentalGridForm.Models" Version="1.0.1" />
<PackageReference Include="CarRentalGridForm.Models" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CarRentalGridForm.Models --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: CarRentalGridForm.Models, 1.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CarRentalGridForm.Models@1.0.1
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CarRentalGridForm.Models&version=1.0.1
#tool nuget:?package=CarRentalGridForm.Models&version=1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Car Rental Grid Form Models
Библиотека моделей и контрактов для системы управления автопарком и прокатом автомобилей.
Установка
dotnet add package CarRentalGridForm.Models
Состав пакета
Константы (Constants/)
- CarLimits.cs — ограничения и константы для валидации
Модели (Models/)
- Car.cs — модель автомобиля с расчётными свойствами
- Statistics.cs — статистика по автопарку
Корневые файлы
- icon.png — иконка пакета (128×128 пикселей)
- README.md — этот файл с описанием
Использование
using CarRentalGridForm.Models;
// Создание автомобиля
var car = new Car
{
Brand = "Hyundai",
LicensePlate = "A123BB77",
Mileage = 15000,
AverageConsumption = 8.5,
CurrentFuel = 45.0,
RentCostPerMinute = 5.5m
};
// Расчётные свойства
Console.WriteLine($"Запас хода: {car.Range} ч");
Console.WriteLine($"Сумма аренды: {car.TotalRentSum} ₽");
Свойства модели Car
| Свойство | Тип | Описание |
|---|---|---|
Id |
int |
Уникальный идентификатор |
Brand |
string |
Марка автомобиля |
LicensePlate |
string |
Гос. номер |
Mileage |
int |
Пробег (км) |
AverageConsumption |
double |
Средний расход (л/100км) |
CurrentFuel |
double |
Текущий уровень топлива (л) |
RentCostPerMinute |
decimal |
Стоимость аренды (₽/мин) |
Range |
double |
Запас хода (часы) — расчётное |
TotalRentSum |
decimal |
Сумма аренды — расчётное |
Автор
Igor Grebenyuk
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- CarRentalGridForm.Constants (>= 1.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.1 | 144 | 4/10/2026 |