Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable CS1591 errors for undocumented API #5223

Merged
merged 4 commits into from
Aug 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
<PreReleaseVersionIteration></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