Skip to content

Commit dafeb58

Browse files
authored
Merge pull request #547 from AArnott/libtemplateUpdate
Merge latest Library.Template
2 parents 8ae5fc2 + ac9a6e8 commit dafeb58

16 files changed

+59
-42
lines changed

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,5 +170,14 @@ dotnet_diagnostic.SA1600.severity = suggestion
170170
# IDE1006: Naming Styles - StyleCop handles these for us
171171
dotnet_diagnostic.IDE1006.severity = none
172172

173+
dotnet_diagnostic.DOC100.severity = silent
174+
dotnet_diagnostic.DOC104.severity = warning
175+
dotnet_diagnostic.DOC105.severity = warning
176+
dotnet_diagnostic.DOC106.severity = warning
177+
dotnet_diagnostic.DOC107.severity = warning
178+
dotnet_diagnostic.DOC108.severity = warning
179+
dotnet_diagnostic.DOC200.severity = warning
180+
dotnet_diagnostic.DOC202.severity = warning
181+
173182
[*.sln]
174183
indent_style = tab

Directory.Build.props

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
<!-- https://github.com/dotnet/msbuild/blob/main/documentation/ProjectReference-Protocol.md#setplatform-negotiation -->
1919
<EnableDynamicPlatformResolution>true</EnableDynamicPlatformResolution>
2020

21+
<!-- Opt in till https://github.com/NuGet/Home/issues/9803 makes this the default. -->
22+
<RestoreUseStaticGraphEvaluation>true</RestoreUseStaticGraphEvaluation>
23+
2124
<!-- This entire repo has just one version.json file, so compute the version once and share with all projects in a large build. -->
2225
<GitVersionBaseDirectory>$(MSBuildThisFileDirectory)</GitVersionBaseDirectory>
2326

@@ -44,10 +47,12 @@
4447

4548
<ItemGroup>
4649
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="all" />
47-
<PackageReference Include="Nerdbank.GitVersioning" Version="3.5.109" PrivateAssets="all" />
50+
<PackageReference Include="Nerdbank.GitVersioning" Version="3.5.113" PrivateAssets="all" />
4851
<PackageReference Include="Nullable" Version="1.3.1" PrivateAssets="all" />
4952
<!-- Use the Unstable package ID so that update tools will help us keep it current even though it seems to be ever-unstable lately. -->
5053
<PackageReference Include="StyleCop.Analyzers.Unstable" Version="1.2.0.435" PrivateAssets="all" />
54+
<PackageReference Include="CSharpIsNullAnalyzer" Version="0.1.329" PrivateAssets="all" />
55+
<PackageReference Include="DotNetAnalyzers.DocumentationAnalyzers" Version="1.0.0-beta.59" PrivateAssets="all" />
5156
</ItemGroup>
5257

5358
<ItemGroup>

ext/.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@
22

33
[*.{cs,csx,vb,vbx,h,cpp,idl}]
44
dotnet_analyzer_diagnostic.severity = none
5+
6+
[*.cs]
7+
dotnet_diagnostic.DOC104.severity = silent

src/Nerdbank.Streams/BufferTextWriter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ private void EncodeCharactersIfBufferFull()
256256
/// <summary>
257257
/// Encodes characters written so far to a buffer provided by the underyling <see cref="bufferWriter"/>.
258258
/// </summary>
259-
/// <param name="flushEncoder"><c>true</c> to flush the characters in the encoder; useful when finalizing the output.</param>
259+
/// <param name="flushEncoder"><see langword="true"/> to flush the characters in the encoder; useful when finalizing the output.</param>
260260
private void EncodeCharacters(bool flushEncoder)
261261
{
262262
if (this.charBufferPosition > 0)

src/Nerdbank.Streams/MultiplexingStream.Channel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ internal bool TryAcceptOffer(ChannelOptions channelOptions)
579579
/// Occurs when the remote party has accepted our offer of this channel.
580580
/// </summary>
581581
/// <param name="acceptanceParameters">The channel parameters provided by the accepting party.</param>
582-
/// <returns>A value indicating whether the acceptance went through; <c>false</c> if the channel is already accepted, rejected or offer rescinded.</returns>
582+
/// <returns>A value indicating whether the acceptance went through; <see langword="false"/> if the channel is already accepted, rejected or offer rescinded.</returns>
583583
internal bool OnAccepted(AcceptanceParameters acceptanceParameters)
584584
{
585585
lock (this.SyncObject)

src/Nerdbank.Streams/MultiplexingStream.ChannelOptions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public ChannelOptions()
3838
/// <summary>
3939
/// Gets or sets an existing <see cref="IDuplexPipe"/> instance used to exchange data with the channel.
4040
/// </summary>
41-
/// <value>The default is <c>null</c>.</value>
41+
/// <value>The default is <see langword="null"/>.</value>
4242
/// <remarks>
4343
/// <para>
4444
/// This property supports high throughput scenarios where channel data ultimately goes to a <see cref="PipeWriter"/> and <see cref="PipeReader"/> that already exist.
@@ -51,7 +51,7 @@ public ChannelOptions()
5151
/// the value of <see cref="ChannelReceivingWindowSize"/> and <see cref="Options.DefaultChannelReceivingWindowSize"/>.
5252
/// </para>
5353
/// </remarks>
54-
/// <exception cref="ArgumentException">Thrown if set to an <see cref="IDuplexPipe"/> that returns <c>null</c> for either of its properties.</exception>
54+
/// <exception cref="ArgumentException">Thrown if set to an <see cref="IDuplexPipe"/> that returns <see langword="null"/> for either of its properties.</exception>
5555
public IDuplexPipe? ExistingPipe
5656
{
5757
get => this.existingPipe;

src/Nerdbank.Streams/MultiplexingStream.Options.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public Options(Options copyFrom)
9191
/// and copies the values from another instance into this one.
9292
/// </summary>
9393
/// <param name="copyFrom">The instance to copy values from.</param>
94-
/// <param name="frozen"><c>true</c> to freeze this copy.</param>
94+
/// <param name="frozen"><see langword="true"/> to freeze this copy.</param>
9595
private Options(Options copyFrom, bool frozen)
9696
: this(copyFrom)
9797
{
@@ -160,10 +160,10 @@ public int ProtocolMajorVersion
160160

161161
/// <summary>
162162
/// Gets or sets a factory for <see cref="TraceSource"/> instances to attach to a newly opened <see cref="Channel"/>
163-
/// when its <see cref="ChannelOptions.TraceSource"/> is <c>null</c>.
163+
/// when its <see cref="ChannelOptions.TraceSource"/> is <see langword="null"/>.
164164
/// </summary>
165165
/// <remarks>
166-
/// <para>The delegate receives a channel ID and name, and may return a <see cref="TraceSource"/> or <c>null</c>.</para>
166+
/// <para>The delegate receives a channel ID and name, and may return a <see cref="TraceSource"/> or <see langword="null"/>.</para>
167167
/// <para>This delegate will not be invoked if <see cref="DefaultChannelTraceSourceFactoryWithQualifier"/> has been set to a non-null value.</para>
168168
/// </remarks>
169169
[Obsolete("Use " + nameof(DefaultChannelTraceSourceFactoryWithQualifier) + " instead.")]
@@ -179,10 +179,10 @@ public int ProtocolMajorVersion
179179

180180
/// <summary>
181181
/// Gets or sets a factory for <see cref="TraceSource"/> instances to attach to a newly opened <see cref="Channel"/>
182-
/// when its <see cref="ChannelOptions.TraceSource"/> is <c>null</c>.
182+
/// when its <see cref="ChannelOptions.TraceSource"/> is <see langword="null"/>.
183183
/// </summary>
184184
/// <remarks>
185-
/// <para>The delegate receives a channel ID and name, and may return a <see cref="TraceSource"/> or <c>null</c>.</para>
185+
/// <para>The delegate receives a channel ID and name, and may return a <see cref="TraceSource"/> or <see langword="null"/>.</para>
186186
/// <para>This delegate supersedes the obsolete <see cref="DefaultChannelTraceSourceFactory"/> as this one provides detail about whether the channel was offered locally or remotely.</para>
187187
/// </remarks>
188188
public Func<QualifiedChannelId, string, TraceSource?>? DefaultChannelTraceSourceFactoryWithQualifier

src/Nerdbank.Streams/MultiplexingStream.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ private enum TraceEventId
240240

241241
/// <summary>
242242
/// Gets a factory for <see cref="TraceSource"/> instances to attach to a newly opened <see cref="Channel"/>
243-
/// when its <see cref="ChannelOptions.TraceSource"/> is <c>null</c>.
243+
/// when its <see cref="ChannelOptions.TraceSource"/> is <see langword="null"/>.
244244
/// </summary>
245245
private Func<QualifiedChannelId, string, TraceSource?>? DefaultChannelTraceSourceFactory { get; }
246246

@@ -715,9 +715,9 @@ public async ValueTask DisposeAsync()
715715
/// </summary>
716716
/// <param name="stream">The stream to read from.</param>
717717
/// <param name="buffer">The buffer to fill.</param>
718-
/// <param name="throwOnEmpty"><c>true</c> to throw if 0 bytes are read before the stream before the end of stream is encountered; <c>false</c> to simply return <c>false</c> when that happens.</param>
718+
/// <param name="throwOnEmpty"><see langword="true"/> to throw if 0 bytes are read before the stream before the end of stream is encountered; <see langword="false"/> to simply return <see langword="false"/> when that happens.</param>
719719
/// <param name="cancellationToken">A cancellation token.</param>
720-
/// <returns><c>true</c> if the buffer was filled as required; <c>false</c> if the stream was empty and no bytes were read, if <paramref name="throwOnEmpty"/> is <c>false</c>.</returns>
720+
/// <returns><see langword="true"/> if the buffer was filled as required; <see langword="false"/> if the stream was empty and no bytes were read, if <paramref name="throwOnEmpty"/> is <see langword="false"/>.</returns>
721721
/// <exception cref="EndOfStreamException">Thrown if the end of the stream was reached before the buffer was filled (unless <paramref name="throwOnEmpty"/> is false and 0 bytes were read).</exception>
722722
private static async ValueTask<bool> ReadToFillAsync(Stream stream, Memory<byte> buffer, bool throwOnEmpty, CancellationToken cancellationToken)
723723
{

src/Nerdbank.Streams/Nerdbank.Streams.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<PackageReference Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="3.3.3" PrivateAssets="all" />
1414
<PackageReference Include="Microsoft.VisualStudio.Threading" Version="$(VSThreadingVersion)" PrivateAssets="build;analyzers;compile" />
1515
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="$(VSThreadingVersion)" PrivateAssets="all" />
16-
<PackageReference Include="Microsoft.VisualStudio.Validation" Version="17.0.53" />
16+
<PackageReference Include="Microsoft.VisualStudio.Validation" Version="17.0.64" />
1717
<PackageReference Include="System.IO.Pipelines" Version="6.0.3" />
1818
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
1919
</ItemGroup>

src/Nerdbank.Streams/PipeExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public static partial class PipeExtensions
3535
/// Exposes a full-duplex pipe as a <see cref="Stream"/>.
3636
/// </summary>
3737
/// <param name="pipe">The pipe to wrap as a stream.</param>
38-
/// <param name="ownsPipe"><c>true</c> to complete the underlying reader and writer when the <see cref="Stream"/> is disposed; <c>false</c> to keep them open.</param>
38+
/// <param name="ownsPipe"><see langword="true"/> to complete the underlying reader and writer when the <see cref="Stream"/> is disposed; <see langword="false"/> to keep them open.</param>
3939
/// <returns>The wrapping stream.</returns>
4040
public static Stream AsStream(this IDuplexPipe pipe, bool ownsPipe) => FullDuplexStream.Splice(pipe.Input.AsStream(leaveOpen: !ownsPipe), pipe.Output.AsStream(leaveOpen: !ownsPipe));
4141

0 commit comments

Comments
 (0)