-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVehicleModule.cs
More file actions
29 lines (26 loc) · 1.04 KB
/
VehicleModule.cs
File metadata and controls
29 lines (26 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
using AltV.Atlas.Vehicles.Client.Base;
using AltV.Atlas.Vehicles.Client.Factories;
using AltV.Atlas.Vehicles.Client.Interfaces;
using AltV.Net.Client.Elements.Entities;
using AltV.Net.Client.Elements.Factories;
using AltV.Net.Client.Elements.Interfaces;
using Microsoft.Extensions.DependencyInjection;
namespace AltV.Atlas.Vehicles.Client;
/// <summary>
/// Main entry point to client-side vehicle module
/// </summary>
public static class VehicleModule
{
/// <summary>
/// Registers the vehicle module and it's classes/interfaces
/// </summary>
/// <param name="serviceCollection">A service collection</param>
/// <returns>The service collection</returns>
public static IServiceCollection RegisterVehicleModule( this IServiceCollection serviceCollection )
{
serviceCollection.AddTransient<IAtlasClientVehicle, AtlasVehicle>( );
serviceCollection.AddTransient<IVehicle, Vehicle>( );
serviceCollection.AddTransient<IEntityFactory<IVehicle>, AltVehicleFactory>( );
return serviceCollection;
}
}