Use string interpolation in debug output

This commit is contained in:
Clemens 2021-07-06 18:49:48 +02:00
parent 7aaa4ed25e
commit c0d3635317
19 changed files with 47 additions and 47 deletions

View file

@ -77,7 +77,7 @@ namespace MapControl.Caching
}
catch (Exception ex)
{
Debug.WriteLine("ImageFileCache: Failed finding {0}: {1}", path, ex.Message);
Debug.WriteLine($"ImageFileCache: Failed finding {path}: {ex.Message}");
}
return false;
@ -115,7 +115,7 @@ namespace MapControl.Caching
}
catch (Exception ex)
{
Debug.WriteLine("ImageFileCache: Failed reading {0}: {1}", path, ex.Message);
Debug.WriteLine($"ImageFileCache: Failed reading {path}: {ex.Message}");
}
}
@ -175,7 +175,7 @@ namespace MapControl.Caching
}
catch (Exception ex)
{
Debug.WriteLine("ImageFileCache: Failed writing {0}: {1}", path, ex.Message);
Debug.WriteLine($"ImageFileCache: Failed writing {path}: {ex.Message}");
}
}
}
@ -238,7 +238,7 @@ namespace MapControl.Caching
}
catch (Exception ex)
{
Debug.WriteLine("ImageFileCache: Failed removing {0}: {1}", path, ex.Message);
Debug.WriteLine($"ImageFileCache: Failed removing {path}: {ex.Message}");
}
return null;

View file

@ -43,7 +43,7 @@ namespace MapControl
Cache.Set(cacheKey, cacheItem, new CacheItemPolicy { AbsoluteExpiration = cacheItem.Item2 });
}
}
//else System.Diagnostics.Debug.WriteLine("Cached: " + cacheKey);
//else System.Diagnostics.Debug.WriteLine($"Cached: {cacheKey}");
if (buffer != null && buffer.Length > 0)
{