public IParkingAccountAdapter GetParkingAccountAdapter(IParkingAccountAdapter.PathType type) { return(type switch { IParkingAccountAdapter.PathType.CurrentDay => (new CurrentParkingAccountAdapter()), IParkingAccountAdapter.PathType.First => (new FirstParkingAccountAdapter()), // IParkingAccountAdapter.PathType.Imported => (IParkingAccountAdapter)new CurrentParkingAccountAdapter(), _ => (new CurrentParkingAccountAdapter()) });
public FileParkingAccountDAO(IParkingAccountAdapter.PathType pathType) { FileParkingAccountAdapterFactory fileFactory = new FileParkingAccountAdapterFactory(); adapter = fileFactory.GetParkingAccountAdapter(pathType); }