From ec03c30f6e3bafb4fe26044eb502f239c3e7f997 Mon Sep 17 00:00:00 2001 From: Viktor Hofer Date: Fri, 11 Aug 2023 16:31:56 +0200 Subject: [PATCH] Enable CS1591 errors for undocumented API (#5223) * Enable CS1591 errors for undocumented API Similar as https://github.com/dotnet/extensions/pull/4230, enable the CS1591 compiler errors when a library generates a documentation file. * Update System.Web.Services.Description.csproj feedback from https://github.com/dotnet/wcf/pull/5222 * Fix "build -vs" and adding /// comments to Federation --------- Co-authored-by: Matt Connew --- eng/Versions.props | 2 ++ eng/build.ps1 | 1 + .../WSTrustChannelSecurityTokenProvider.cs | 7 +++++- .../Federation/WsTrustTokenParameters.cs | 24 +++++++++++++++++++ .../System.Web.Services.Description.csproj | 2 +- 5 files changed, 34 insertions(+), 2 deletions(-) diff --git a/eng/Versions.props b/eng/Versions.props index 62a9ee304bc..d4d85ce1f4f 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -13,6 +13,8 @@ true + + true diff --git a/eng/build.ps1 b/eng/build.ps1 index 05e968b5a8d..335d92bea3e 100644 --- a/eng/build.ps1 +++ b/eng/build.ps1 @@ -4,6 +4,7 @@ Param( [switch][Alias('b')]$build, [switch][Alias('t')]$test, [string][Alias('c')]$configuration = "Debug", + [string]$vs, [string]$os, [switch]$coverage, [string]$testscope, diff --git a/src/System.ServiceModel.Federation/src/System/ServiceModel/Federation/WSTrustChannelSecurityTokenProvider.cs b/src/System.ServiceModel.Federation/src/System/ServiceModel/Federation/WSTrustChannelSecurityTokenProvider.cs index 073faea1557..1f96d5d650c 100644 --- a/src/System.ServiceModel.Federation/src/System/ServiceModel/Federation/WSTrustChannelSecurityTokenProvider.cs +++ b/src/System.ServiceModel.Federation/src/System/ServiceModel/Federation/WSTrustChannelSecurityTokenProvider.cs @@ -108,10 +108,13 @@ private void CacheSecurityTokenResponse(WsTrustRequest request, WsTrustResponse /// internal virtual ChannelFactory ChannelFactory { get; set; } + /// + /// Gets or sets the class used by the token provider. + /// internal protected ClientCredentials ClientCredentials { get; set; } /// - /// Creates a from the + /// Creates a from the . /// /// protected virtual WsTrustRequest CreateWsTrustRequest() @@ -436,8 +439,10 @@ private void SetInboundSerializationContext() _requestSerializationContext = new WsSerializationContext(GetWsTrustVersion(messageSecurityVersion)); } + /// public override bool SupportsTokenCancellation => false; + /// public override bool SupportsTokenRenewal => false; internal WSTrustTokenParameters WSTrustTokenParameters { get; } diff --git a/src/System.ServiceModel.Federation/src/System/ServiceModel/Federation/WsTrustTokenParameters.cs b/src/System.ServiceModel.Federation/src/System/ServiceModel/Federation/WsTrustTokenParameters.cs index 14b34f4fb7a..11a11e21b9f 100644 --- a/src/System.ServiceModel.Federation/src/System/ServiceModel/Federation/WsTrustTokenParameters.cs +++ b/src/System.ServiceModel.Federation/src/System/ServiceModel/Federation/WsTrustTokenParameters.cs @@ -21,9 +21,24 @@ namespace System.ServiceModel.Federation /// public class WSTrustTokenParameters : IssuedSecurityTokenParameters { + /// + /// Default value used for . + /// public static readonly bool DefaultCacheIssuedTokens = true; + + /// + /// Default value used for . + /// public static readonly int DefaultIssuedTokenRenewalThresholdPercentage = 60; + + /// + /// Default value used for . + /// public static readonly TimeSpan DefaultMaxIssuedTokenCachingTime = TimeSpan.MaxValue; + + /// + /// Default value used for when constructing a WSTrustTokenParameters instance. + /// public static readonly SecurityKeyType DefaultSecurityKeyType = SecurityKeyType.SymmetricKey; private TimeSpan _maxIssuedTokenCachingTime = DefaultMaxIssuedTokenCachingTime; @@ -157,6 +172,12 @@ public MessageSecurityVersion MessageSecurityVersion /// public string RequestContext { get; set; } + /// + /// Factory method to create a instance using the same MessageSecurityVersion as WSFederationHttpBinding uses in .NET Framework + /// + /// + /// + /// public static WSTrustTokenParameters CreateWSFederationTokenParameters(Binding issuerBinding, EndpointAddress issuerAddress) { return new WSTrustTokenParameters @@ -169,6 +190,9 @@ public static WSTrustTokenParameters CreateWSFederationTokenParameters(Binding i }; } + /// + /// Factory method to create a instance using the same MessageSecurityVersion as WS2007FederationHttpBinding uses in .NET Framework + /// public static WSTrustTokenParameters CreateWS2007FederationTokenParameters(Binding issuerBinding, EndpointAddress issuerAddress) { return new WSTrustTokenParameters diff --git a/src/System.Web.Services.Description/src/System.Web.Services.Description.csproj b/src/System.Web.Services.Description/src/System.Web.Services.Description.csproj index babaa6fe64b..edd3b0e8eb2 100644 --- a/src/System.Web.Services.Description/src/System.Web.Services.Description.csproj +++ b/src/System.Web.Services.Description/src/System.Web.Services.Description.csproj @@ -8,7 +8,7 @@ true $(Ship_WcfPackages) netstandard2.0;net461 - true + true false Contains classes that enable you to publicly describe an XML Web service by using the Web Services Description Language (WSDL).