Skip to content

Commit

Permalink
fix: Remove build warning
Browse files Browse the repository at this point in the history
  • Loading branch information
HofmeisterAn committed Dec 12, 2022
1 parent a99436d commit 0d3dba8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Testcontainers/Configurations/CustomConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,15 @@ private T GetPropertyValue<T>(string propertyName)
{
return (T)(object)(this.properties.TryGetValue(propertyName, out var propertyValue) && ("1".Equals(propertyValue, StringComparison.Ordinal) || (bool.TryParse(propertyValue, out var result) && result)));
}

case TypeCode.String:
{
_ = this.properties.TryGetValue(propertyName, out var propertyValue);
return (T)(object)propertyValue;
}

default:
throw new InvalidOperationException();
throw new ArgumentOutOfRangeException(typeof(T).Name);
}
}
}
Expand Down

0 comments on commit 0d3dba8

Please sign in to comment.