Skip to content

Commit

Permalink
PR #450: Fix CA1200 code analyzer warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Numpsy authored Jun 19, 2020
1 parent 23841d2 commit 274df70
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 45 deletions.
2 changes: 1 addition & 1 deletion src/ICSharpCode.SharpZipLib/Core/NameFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public static bool IsValidFilterExpression(string toTest)
/// Split a string into its component pieces
/// </summary>
/// <param name="original">The original string</param>
/// <returns>Returns an array of <see cref="T:System.String"/> values containing the individual filter elements.</returns>
/// <returns>Returns an array of <see cref="System.String"/> values containing the individual filter elements.</returns>
public static string[] SplitQuoted(string original)
{
char escape = '\\';
Expand Down
88 changes: 44 additions & 44 deletions src/ICSharpCode.SharpZipLib/Zip/ZipFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4004,12 +4004,12 @@ public override long Position
/// <returns>
/// The total number of bytes read into the buffer. This can be less than the number of bytes requested if that many bytes are not currently available, or zero (0) if the end of the stream has been reached.
/// </returns>
/// <exception cref="T:System.ArgumentException">The sum of offset and count is larger than the buffer length. </exception>
/// <exception cref="T:System.ObjectDisposedException">Methods were called after the stream was closed. </exception>
/// <exception cref="T:System.NotSupportedException">The stream does not support reading. </exception>
/// <exception cref="T:System.ArgumentNullException">buffer is null. </exception>
/// <exception cref="T:System.IO.IOException">An I/O error occurs. </exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">offset or count is negative. </exception>
/// <exception cref="System.ArgumentException">The sum of offset and count is larger than the buffer length. </exception>
/// <exception cref="System.ObjectDisposedException">Methods were called after the stream was closed. </exception>
/// <exception cref="System.NotSupportedException">The stream does not support reading. </exception>
/// <exception cref="System.ArgumentNullException">buffer is null. </exception>
/// <exception cref="System.IO.IOException">An I/O error occurs. </exception>
/// <exception cref="System.ArgumentOutOfRangeException">offset or count is negative. </exception>
public override int Read(byte[] buffer, int offset, int count)
{
return 0;
Expand All @@ -4019,13 +4019,13 @@ public override int Read(byte[] buffer, int offset, int count)
/// Sets the position within the current stream.
/// </summary>
/// <param name="offset">A byte offset relative to the origin parameter.</param>
/// <param name="origin">A value of type <see cref="T:System.IO.SeekOrigin"></see> indicating the reference point used to obtain the new position.</param>
/// <param name="origin">A value of type <see cref="System.IO.SeekOrigin"></see> indicating the reference point used to obtain the new position.</param>
/// <returns>
/// The new position within the current stream.
/// </returns>
/// <exception cref="T:System.IO.IOException">An I/O error occurs. </exception>
/// <exception cref="T:System.NotSupportedException">The stream does not support seeking, such as if the stream is constructed from a pipe or console output. </exception>
/// <exception cref="T:System.ObjectDisposedException">Methods were called after the stream was closed. </exception>
/// <exception cref="System.IO.IOException">An I/O error occurs. </exception>
/// <exception cref="System.NotSupportedException">The stream does not support seeking, such as if the stream is constructed from a pipe or console output. </exception>
/// <exception cref="System.ObjectDisposedException">Methods were called after the stream was closed. </exception>
public override long Seek(long offset, SeekOrigin origin)
{
return 0;
Expand All @@ -4035,9 +4035,9 @@ public override long Seek(long offset, SeekOrigin origin)
/// Sets the length of the current stream.
/// </summary>
/// <param name="value">The desired length of the current stream in bytes.</param>
/// <exception cref="T:System.NotSupportedException">The stream does not support both writing and seeking, such as if the stream is constructed from a pipe or console output. </exception>
/// <exception cref="T:System.IO.IOException">An I/O error occurs. </exception>
/// <exception cref="T:System.ObjectDisposedException">Methods were called after the stream was closed. </exception>
/// <exception cref="System.NotSupportedException">The stream does not support both writing and seeking, such as if the stream is constructed from a pipe or console output. </exception>
/// <exception cref="System.IO.IOException">An I/O error occurs. </exception>
/// <exception cref="System.ObjectDisposedException">Methods were called after the stream was closed. </exception>
public override void SetLength(long value)
{
}
Expand All @@ -4048,12 +4048,12 @@ public override void SetLength(long value)
/// <param name="buffer">An array of bytes. This method copies count bytes from buffer to the current stream.</param>
/// <param name="offset">The zero-based byte offset in buffer at which to begin copying bytes to the current stream.</param>
/// <param name="count">The number of bytes to be written to the current stream.</param>
/// <exception cref="T:System.IO.IOException">An I/O error occurs. </exception>
/// <exception cref="T:System.NotSupportedException">The stream does not support writing. </exception>
/// <exception cref="T:System.ObjectDisposedException">Methods were called after the stream was closed. </exception>
/// <exception cref="T:System.ArgumentNullException">buffer is null. </exception>
/// <exception cref="T:System.ArgumentException">The sum of offset and count is greater than the buffer length. </exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">offset or count is negative. </exception>
/// <exception cref="System.IO.IOException">An I/O error occurs. </exception>
/// <exception cref="System.NotSupportedException">The stream does not support writing. </exception>
/// <exception cref="System.ObjectDisposedException">Methods were called after the stream was closed. </exception>
/// <exception cref="System.ArgumentNullException">buffer is null. </exception>
/// <exception cref="System.ArgumentException">The sum of offset and count is greater than the buffer length. </exception>
/// <exception cref="System.ArgumentOutOfRangeException">offset or count is negative. </exception>
public override void Write(byte[] buffer, int offset, int count)
{
baseStream_.Write(buffer, offset, count);
Expand Down Expand Up @@ -4133,12 +4133,12 @@ public override int ReadByte()
/// <returns>
/// The total number of bytes read into the buffer. This can be less than the number of bytes requested if that many bytes are not currently available, or zero (0) if the end of the stream has been reached.
/// </returns>
/// <exception cref="T:System.ArgumentException">The sum of offset and count is larger than the buffer length. </exception>
/// <exception cref="T:System.ObjectDisposedException">Methods were called after the stream was closed. </exception>
/// <exception cref="T:System.NotSupportedException">The stream does not support reading. </exception>
/// <exception cref="T:System.ArgumentNullException">buffer is null. </exception>
/// <exception cref="T:System.IO.IOException">An I/O error occurs. </exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">offset or count is negative. </exception>
/// <exception cref="System.ArgumentException">The sum of offset and count is larger than the buffer length. </exception>
/// <exception cref="System.ObjectDisposedException">Methods were called after the stream was closed. </exception>
/// <exception cref="System.NotSupportedException">The stream does not support reading. </exception>
/// <exception cref="System.ArgumentNullException">buffer is null. </exception>
/// <exception cref="System.IO.IOException">An I/O error occurs. </exception>
/// <exception cref="System.ArgumentOutOfRangeException">offset or count is negative. </exception>
public override int Read(byte[] buffer, int offset, int count)
{
lock (baseStream_)
Expand Down Expand Up @@ -4172,12 +4172,12 @@ public override int Read(byte[] buffer, int offset, int count)
/// <param name="buffer">An array of bytes. This method copies count bytes from buffer to the current stream.</param>
/// <param name="offset">The zero-based byte offset in buffer at which to begin copying bytes to the current stream.</param>
/// <param name="count">The number of bytes to be written to the current stream.</param>
/// <exception cref="T:System.IO.IOException">An I/O error occurs. </exception>
/// <exception cref="T:System.NotSupportedException">The stream does not support writing. </exception>
/// <exception cref="T:System.ObjectDisposedException">Methods were called after the stream was closed. </exception>
/// <exception cref="T:System.ArgumentNullException">buffer is null. </exception>
/// <exception cref="T:System.ArgumentException">The sum of offset and count is greater than the buffer length. </exception>
/// <exception cref="T:System.ArgumentOutOfRangeException">offset or count is negative. </exception>
/// <exception cref="System.IO.IOException">An I/O error occurs. </exception>
/// <exception cref="System.NotSupportedException">The stream does not support writing. </exception>
/// <exception cref="System.ObjectDisposedException">Methods were called after the stream was closed. </exception>
/// <exception cref="System.ArgumentNullException">buffer is null. </exception>
/// <exception cref="System.ArgumentException">The sum of offset and count is greater than the buffer length. </exception>
/// <exception cref="System.ArgumentOutOfRangeException">offset or count is negative. </exception>
public override void Write(byte[] buffer, int offset, int count)
{
throw new NotSupportedException();
Expand All @@ -4187,9 +4187,9 @@ public override void Write(byte[] buffer, int offset, int count)
/// When overridden in a derived class, sets the length of the current stream.
/// </summary>
/// <param name="value">The desired length of the current stream in bytes.</param>
/// <exception cref="T:System.NotSupportedException">The stream does not support both writing and seeking, such as if the stream is constructed from a pipe or console output. </exception>
/// <exception cref="T:System.IO.IOException">An I/O error occurs. </exception>
/// <exception cref="T:System.ObjectDisposedException">Methods were called after the stream was closed. </exception>
/// <exception cref="System.NotSupportedException">The stream does not support both writing and seeking, such as if the stream is constructed from a pipe or console output. </exception>
/// <exception cref="System.IO.IOException">An I/O error occurs. </exception>
/// <exception cref="System.ObjectDisposedException">Methods were called after the stream was closed. </exception>
public override void SetLength(long value)
{
throw new NotSupportedException();
Expand All @@ -4199,13 +4199,13 @@ public override void SetLength(long value)
/// When overridden in a derived class, sets the position within the current stream.
/// </summary>
/// <param name="offset">A byte offset relative to the origin parameter.</param>
/// <param name="origin">A value of type <see cref="T:System.IO.SeekOrigin"></see> indicating the reference point used to obtain the new position.</param>
/// <param name="origin">A value of type <see cref="System.IO.SeekOrigin"></see> indicating the reference point used to obtain the new position.</param>
/// <returns>
/// The new position within the current stream.
/// </returns>
/// <exception cref="T:System.IO.IOException">An I/O error occurs. </exception>
/// <exception cref="T:System.NotSupportedException">The stream does not support seeking, such as if the stream is constructed from a pipe or console output. </exception>
/// <exception cref="T:System.ObjectDisposedException">Methods were called after the stream was closed. </exception>
/// <exception cref="System.IO.IOException">An I/O error occurs. </exception>
/// <exception cref="System.NotSupportedException">The stream does not support seeking, such as if the stream is constructed from a pipe or console output. </exception>
/// <exception cref="System.ObjectDisposedException">Methods were called after the stream was closed. </exception>
public override long Seek(long offset, SeekOrigin origin)
{
long newPos = readPos_;
Expand Down Expand Up @@ -4241,7 +4241,7 @@ public override long Seek(long offset, SeekOrigin origin)
/// <summary>
/// Clears all buffers for this stream and causes any buffered data to be written to the underlying device.
/// </summary>
/// <exception cref="T:System.IO.IOException">An I/O error occurs. </exception>
/// <exception cref="System.IO.IOException">An I/O error occurs. </exception>
public override void Flush()
{
// Nothing to do.
Expand All @@ -4252,9 +4252,9 @@ public override void Flush()
/// </summary>
/// <value></value>
/// <returns>The current position within the stream.</returns>
/// <exception cref="T:System.IO.IOException">An I/O error occurs. </exception>
/// <exception cref="T:System.NotSupportedException">The stream does not support seeking. </exception>
/// <exception cref="T:System.ObjectDisposedException">Methods were called after the stream was closed. </exception>
/// <exception cref="System.IO.IOException">An I/O error occurs. </exception>
/// <exception cref="System.NotSupportedException">The stream does not support seeking. </exception>
/// <exception cref="System.ObjectDisposedException">Methods were called after the stream was closed. </exception>
public override long Position
{
get { return readPos_ - start_; }
Expand All @@ -4280,8 +4280,8 @@ public override long Position
/// </summary>
/// <value></value>
/// <returns>A long value representing the length of the stream in bytes.</returns>
/// <exception cref="T:System.NotSupportedException">A class derived from Stream does not support seeking. </exception>
/// <exception cref="T:System.ObjectDisposedException">Methods were called after the stream was closed. </exception>
/// <exception cref="System.NotSupportedException">A class derived from Stream does not support seeking. </exception>
/// <exception cref="System.ObjectDisposedException">Methods were called after the stream was closed. </exception>
public override long Length
{
get { return length_; }
Expand Down

0 comments on commit 274df70

Please sign in to comment.