diff --git a/Stormtrooper/Stormtrooper/Program.cs b/Stormtrooper/Stormtrooper/Program.cs
index 50685ff..d2bef84 100644
--- a/Stormtrooper/Stormtrooper/Program.cs
+++ b/Stormtrooper/Stormtrooper/Program.cs
@@ -30,11 +30,12 @@ namespace Stormtrooper
{
var configuration = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory())
- .AddJsonFile(path: "appSettings.json", optional: false, reloadOnChange: true)
+ .AddJsonFile(path: "appSetting.json", optional: false, reloadOnChange: true)
.Build();
var logger = new LoggerConfiguration()
- .ReadFrom.Configuration(configuration);
+ .ReadFrom.Configuration(configuration)
+ .CreateLogger();
option.SetMinimumLevel(LogLevel.Information);
option.AddSerilog(logger);
diff --git a/Stormtrooper/Stormtrooper/SetAirplaneGeneric.cs b/Stormtrooper/Stormtrooper/SetAirplaneGeneric.cs
index 04001c0..90a54e1 100644
--- a/Stormtrooper/Stormtrooper/SetAirplaneGeneric.cs
+++ b/Stormtrooper/Stormtrooper/SetAirplaneGeneric.cs
@@ -34,8 +34,8 @@ namespace Stormtrooper
///
public int Insert(T airplane)
{
- if (Count == _maxCount)
- return -1;
+ if (Count >= _maxCount)
+ throw new StorageOverflowException(_maxCount);
Insert(airplane, 0);
return 0;
}
@@ -63,7 +63,7 @@ namespace Stormtrooper
if (Count == 0 || position < 0 || position >= _maxCount)
throw new AirplaneNotFoundException(position);
T air = _places[position];
- _places[position] = null;
+ _places.RemoveAt(position);
return air;
}
///
diff --git a/Stormtrooper/Stormtrooper/Stormtrooper.csproj b/Stormtrooper/Stormtrooper/Stormtrooper.csproj
index 30817a2..627cd34 100644
--- a/Stormtrooper/Stormtrooper/Stormtrooper.csproj
+++ b/Stormtrooper/Stormtrooper/Stormtrooper.csproj
@@ -8,13 +8,30 @@
enable
+
+
+
+
+
+
+ Always
+
+
+
+
+
+
+
+
+
+
@@ -23,4 +40,6 @@
+
+
\ No newline at end of file