Use nameof operator instead of string literal.

This commit is contained in:
Kenneth Hsu
2017-10-14 11:43:31 -07:00
parent 1846c67aae
commit 07bfc4a5da
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -1353,7 +1353,7 @@ namespace Duplicati.Library.Main
long blocksize = Library.Utility.Sizeparser.ParseSize(tmp, "kb");
if (blocksize > int.MaxValue || blocksize < 1024)
throw new ArgumentOutOfRangeException("blocksize", string.Format("The blocksize cannot be less than {0}, nor larger than {1}", 1024, int.MaxValue));
throw new ArgumentOutOfRangeException(nameof(blocksize), string.Format("The blocksize cannot be less than {0}, nor larger than {1}", 1024, int.MaxValue));
return (int)blocksize;
}
@@ -103,7 +103,7 @@ namespace Duplicati.Library.Utility
m_passWriteThrough = passWriteThrough;
m_blockOnFlush = blockOnFlush;
m_blockOnClose = blockOnClose;
if (bufsize <= 0) throw new ArgumentOutOfRangeException("bufsize");
if (bufsize <= 0) throw new ArgumentOutOfRangeException(nameof(bufsize));
m_buf = new byte[bufsize];
m_readerStream = new LinkedReaderStream(this);
m_writerStream = new LinkedWriterStream(this);