diff options
author | Jens Geyer <jensg@apache.org> | 2021-10-28 22:31:12 +0200 |
---|---|---|
committer | Jens Geyer <jensg@apache.org> | 2021-10-28 23:02:12 +0200 |
commit | 3f1fd599251027931ccde7aff893f6d64e8a840f (patch) | |
tree | efb1f8a960e2043c0780b6aed02a250f3e7997d0 | |
parent | 007b99b72adcc97a0715b92d5f495620bee35715 (diff) | |
download | thrift-3f1fd599251027931ccde7aff893f6d64e8a840f.tar.gz |
- Fixed a few XML comments and ArgumentException arguments
- Suppressed certain unwanted CS1591 "XML comments missing" warnings
4 files changed, 14 insertions, 7 deletions
diff --git a/lib/netstd/Thrift/.editorconfig b/lib/netstd/Thrift/.editorconfig new file mode 100644 index 000000000..54b698cf4 --- /dev/null +++ b/lib/netstd/Thrift/.editorconfig @@ -0,0 +1,4 @@ +[*.cs] + +# CS1591: missing XML comment for public element +dotnet_diagnostic.CS1591.severity = silent diff --git a/lib/netstd/Thrift/Server/TThreadPoolAsyncServer.cs b/lib/netstd/Thrift/Server/TThreadPoolAsyncServer.cs index 49593cc0d..46cc9d4a8 100644 --- a/lib/netstd/Thrift/Server/TThreadPoolAsyncServer.cs +++ b/lib/netstd/Thrift/Server/TThreadPoolAsyncServer.cs @@ -1,4 +1,4 @@ -/** +/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information @@ -216,9 +216,9 @@ namespace Thrift.Server /// <summary> /// Loops on processing a client forever - /// threadContext will be a TTransport instance + /// client will be a TTransport instance /// </summary> - /// <param name="threadContext"></param> + /// <param name="client"></param> private async Task ExecuteAsync(TTransport client) { var cancellationToken = ServerCancellationToken; diff --git a/lib/netstd/Thrift/Transport/Client/TMemoryBufferTransport.cs b/lib/netstd/Thrift/Transport/Client/TMemoryBufferTransport.cs index 797de4e57..a666c7c97 100644 --- a/lib/netstd/Thrift/Transport/Client/TMemoryBufferTransport.cs +++ b/lib/netstd/Thrift/Transport/Client/TMemoryBufferTransport.cs @@ -21,6 +21,9 @@ using System.IO; using System.Threading; using System.Threading.Tasks; +#pragma warning disable IDE0079 // unused suppression +#pragma warning disable IDE0066 // requires C# 8 + namespace Thrift.Transport.Client { // ReSharper disable once InconsistentNaming @@ -89,7 +92,7 @@ namespace Thrift.Transport.Client public override void Close() { - /** do nothing **/ + /* do nothing */ } public void Seek(int delta, SeekOrigin origin) @@ -107,11 +110,11 @@ namespace Thrift.Transport.Client newPos = _bytesUsed + delta; break; default: - throw new ArgumentException(nameof(origin)); + throw new ArgumentException("Unrecognized value",nameof(origin)); } if ((0 > newPos) || (newPos > _bytesUsed)) - throw new ArgumentException(nameof(origin)); + throw new ArgumentException("Cannot seek outside of the valid range",nameof(origin)); Position = newPos; ResetConsumedMessageSize(); diff --git a/lib/netstd/Thrift/Transport/TTransportFactory.cs b/lib/netstd/Thrift/Transport/TTransportFactory.cs index 16e27ac82..5f604f163 100644 --- a/lib/netstd/Thrift/Transport/TTransportFactory.cs +++ b/lib/netstd/Thrift/Transport/TTransportFactory.cs @@ -18,7 +18,7 @@ namespace Thrift.Transport { /// <summary> - /// From Mark Slee & Aditya Agarwal of Facebook: + /// From Mark Slee & Aditya Agarwal of Facebook: /// Factory class used to create wrapped instance of Transports. /// This is used primarily in servers, which get Transports from /// a ServerTransport and then may want to mutate them (i.e. create |