Skip to content

Commit c7ae190

Browse files
committed
Slightly optimize SqliteCacheOptions.CachePath setter
1 parent f0a27ce commit c7ae190

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

SqliteCache/SqliteCacheOptions.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,15 @@ public string CachePath
2727
set
2828
{
2929
// User might have passed a connection string instead of a data source
30-
if (value.StartsWith("Data Source=", StringComparison.InvariantCultureIgnoreCase))
30+
if (value.StartsWith("Data Source=", StringComparison.OrdinalIgnoreCase))
3131
{
3232
value = value.Replace("Data Source=", "");
3333
}
34-
value = value.Trim();
3534
if (value.Contains("=") || value.Contains("\""))
3635
{
3736
throw new ArgumentException("CachePath must be a path and not a connection string!");
3837
}
39-
_cachePath = value;
38+
_cachePath = value.Trim();
4039
}
4140
}
4241

0 commit comments

Comments
 (0)