Skip to content

Commit

Permalink
Enable CS1591 errors for undocumented API (#5223)
Browse files Browse the repository at this point in the history
* Enable CS1591 errors for undocumented API

Similar as dotnet/extensions#4230, enable the CS1591 compiler errors when a library generates a documentation file.

* Update System.Web.Services.Description.csproj

feedback from #5222

* Fix "build -vs" and adding /// comments to Federation

---------

Co-authored-by: Matt Connew <mconnew@users.noreply.github.com>
  • Loading branch information
ViktorHofer and mconnew authored Aug 11, 2023
1 parent f339387 commit ec03c30
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 2 deletions.
2 changes: 2 additions & 0 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
</PreReleaseVersionIteration>
<!-- Opt-in repo features -->
<UsingToolIbcOptimization>true</UsingToolIbcOptimization>
<!-- Enabling this rule will cause build failures on undocumented public APIs. -->
<SkipArcadeNoWarnCS1591>true</SkipArcadeNoWarnCS1591>
</PropertyGroup>
<!-- Arcade dependencies -->
<PropertyGroup>
Expand Down
1 change: 1 addition & 0 deletions eng/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,13 @@ private void CacheSecurityTokenResponse(WsTrustRequest request, WsTrustResponse
/// <returns></returns>
internal virtual ChannelFactory<IRequestChannel> ChannelFactory { get; set; }

/// <summary>
/// Gets or sets the <see cref="ClientCredentials"/> class used by the token provider.
/// </summary>
internal protected ClientCredentials ClientCredentials { get; set; }

/// <summary>
/// Creates a <see cref="WsTrustRequest"/> from the <see cref="WSTrustTokenParameters"/>
/// Creates a <see cref="WsTrustRequest"/> from the <see cref="WSTrustTokenParameters"/>.
/// </summary>
/// <returns></returns>
protected virtual WsTrustRequest CreateWsTrustRequest()
Expand Down Expand Up @@ -436,8 +439,10 @@ private void SetInboundSerializationContext()
_requestSerializationContext = new WsSerializationContext(GetWsTrustVersion(messageSecurityVersion));
}

/// <inheritdoc/>
public override bool SupportsTokenCancellation => false;

/// <inheritdoc/>
public override bool SupportsTokenRenewal => false;

internal WSTrustTokenParameters WSTrustTokenParameters { get; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,24 @@ namespace System.ServiceModel.Federation
/// </summary>
public class WSTrustTokenParameters : IssuedSecurityTokenParameters
{
/// <summary>
/// Default value used for <see cref="CacheIssuedTokens"/>.
/// </summary>
public static readonly bool DefaultCacheIssuedTokens = true;

/// <summary>
/// Default value used for <see cref="IssuedTokenRenewalThresholdPercentage"/>.
/// </summary>
public static readonly int DefaultIssuedTokenRenewalThresholdPercentage = 60;

/// <summary>
/// Default value used for <see cref="MaxIssuedTokenCachingTime"/>.
/// </summary>
public static readonly TimeSpan DefaultMaxIssuedTokenCachingTime = TimeSpan.MaxValue;

/// <summary>
/// Default value used for <see cref="IssuedSecurityTokenParameters.KeyType"/> when constructing a WSTrustTokenParameters instance.
/// </summary>
public static readonly SecurityKeyType DefaultSecurityKeyType = SecurityKeyType.SymmetricKey;

private TimeSpan _maxIssuedTokenCachingTime = DefaultMaxIssuedTokenCachingTime;
Expand Down Expand Up @@ -157,6 +172,12 @@ public MessageSecurityVersion MessageSecurityVersion
/// </summary>
public string RequestContext { get; set; }

/// <summary>
/// Factory method to create a <see cref="WSTrustTokenParameters"/> instance using the same MessageSecurityVersion as WSFederationHttpBinding uses in .NET Framework
/// </summary>
/// <param name="issuerBinding"></param>
/// <param name="issuerAddress"></param>
/// <returns></returns>
public static WSTrustTokenParameters CreateWSFederationTokenParameters(Binding issuerBinding, EndpointAddress issuerAddress)
{
return new WSTrustTokenParameters
Expand All @@ -169,6 +190,9 @@ public static WSTrustTokenParameters CreateWSFederationTokenParameters(Binding i
};
}

/// <summary>
/// Factory method to create a <see cref="WSTrustTokenParameters"/> instance using the same MessageSecurityVersion as WS2007FederationHttpBinding uses in .NET Framework
/// </summary>
public static WSTrustTokenParameters CreateWS2007FederationTokenParameters(Binding issuerBinding, EndpointAddress issuerAddress)
{
return new WSTrustTokenParameters
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<IsPackable>true</IsPackable>
<IsShipping>$(Ship_WcfPackages)</IsShipping>
<TargetFrameworks>netstandard2.0;net461</TargetFrameworks>
<IsPartialFacadeAssembly Condition="'$(TargetFramework)' == 'net461'">true</IsPartialFacadeAssembly>
<IsPartialFacadeAssembly Condition="'$(TargetFramework)' == 'net461'">true</IsPartialFacadeAssembly>
<EnableDefaultItems Condition="'$(TargetFramework)' == 'net461'">false</EnableDefaultItems>
<PackageDescription>Contains classes that enable you to publicly describe an XML Web service by using the Web Services Description Language (WSDL).</PackageDescription>
</PropertyGroup>
Expand Down

0 comments on commit ec03c30

Please sign in to comment.