Седьмая лабораторная работа

This commit is contained in:
allllen4a 2023-12-05 12:19:49 +03:00
parent f9f2e0f4e8
commit aa62dc46fa
6 changed files with 2 additions and 11 deletions

View File

@ -14,7 +14,6 @@ namespace projectDoubleDeckerBus.Exceptions
public BusNotFoundException(int i) : base($"Не найден объект по позиции { i}") { } public BusNotFoundException(int i) : base($"Не найден объект по позиции { i}") { }
public BusNotFoundException() : base() { } public BusNotFoundException() : base() { }
public BusNotFoundException(string message) : base(message) { } public BusNotFoundException(string message) : base(message) { }
public BusNotFoundException(string message, Exception exception) : public BusNotFoundException(string message, Exception exception) :
base(message, exception) base(message, exception)
{ } { }

View File

@ -53,7 +53,6 @@ namespace projectDoubleDeckerBus
/// <param name="obj"></param> /// <param name="obj"></param>
/// <returns></returns> /// <returns></returns>
/// ///
public static bool operator +(BusesGenericCollection<T, U> collect, T? public static bool operator +(BusesGenericCollection<T, U> collect, T?
obj) obj)
{ {
@ -73,13 +72,11 @@ namespace projectDoubleDeckerBus
} }
return obj; return obj;
} }
// получение объекта imoveableObj // получение объекта imoveableObj
public U? GetU(int pos) public U? GetU(int pos)
{ {
return (U?)_collection[pos]?.GetMoveableObject; return (U?)_collection[pos]?.GetMoveableObject;
} }
/// <summary> /// <summary>
/// Вывод всего набора объектов /// Вывод всего набора объектов
/// </summary> /// </summary>

View File

@ -17,7 +17,6 @@ namespace projectDoubleDeckerBus.Generics
public List<string> Keys => _busStorages.Keys.ToList(); public List<string> Keys => _busStorages.Keys.ToList();
private readonly int _pictureWidth; private readonly int _pictureWidth;
private readonly int _pictureHeight; private readonly int _pictureHeight;
private static readonly char _separatorForKeyValue = '|'; private static readonly char _separatorForKeyValue = '|';
/// <summary> /// <summary>
/// Разделитель для записей коллекции данных в файл /// Разделитель для записей коллекции данных в файл
@ -55,8 +54,6 @@ namespace projectDoubleDeckerBus.Generics
return null; return null;
} }
} }
public void SaveData(string filename) public void SaveData(string filename)
{ {
if (File.Exists(filename)) if (File.Exists(filename))

View File

@ -21,7 +21,6 @@ namespace projectDoubleDeckerBus
Application.Run(serviceProvider.GetRequiredService<FormBusCollection>()); Application.Run(serviceProvider.GetRequiredService<FormBusCollection>());
} }
} }
private static void ConfigureServices(ServiceCollection services) private static void ConfigureServices(ServiceCollection services)
{ {
services.AddSingleton<FormBusCollection>().AddLogging(option => services.AddSingleton<FormBusCollection>().AddLogging(option =>

View File

@ -6,7 +6,6 @@ using System.Threading.Tasks;
using System.Runtime.Serialization; using System.Runtime.Serialization;
namespace projectDoubleDeckerBus.Exceptions namespace projectDoubleDeckerBus.Exceptions
{ {
[Serializable] [Serializable]
internal class StorageOverflowException : ApplicationException internal class StorageOverflowException : ApplicationException