Use nameof operator instead of string literal.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user