* Update dependencies from https://github.com/dotnet/arcade build
20200316.1
- Microsoft.DotNet.XUnitExtensions - 5.0.0-beta.20166.1
- Microsoft.DotNet.VersionTools.Tasks - 5.0.0-beta.20166.1
- Microsoft.DotNet.ApiCompat - 5.0.0-beta.20166.1
- Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.20166.1
- Microsoft.DotNet.Build.Tasks.Feed - 5.0.0-beta.20166.1
- Microsoft.DotNet.Build.Tasks.Packaging - 5.0.0-beta.20166.1
- Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk - 5.0.0-beta.20166.1
- Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk - 5.0.0-beta.20166.1
- Microsoft.DotNet.CodeAnalysis - 5.0.0-beta.20166.1
- Microsoft.DotNet.GenAPI - 5.0.0-beta.20166.1
- Microsoft.DotNet.GenFacades - 5.0.0-beta.20166.1
- Microsoft.DotNet.Helix.Sdk - 5.0.0-beta.20166.1
- Microsoft.DotNet.RemoteExecutor - 5.0.0-beta.20166.1
- Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.20166.1
* Update dependencies from https://github.com/dotnet/arcade build
20200316.3
- Microsoft.DotNet.XUnitExtensions - 5.0.0-beta.20166.3
- Microsoft.DotNet.VersionTools.Tasks - 5.0.0-beta.20166.3
- Microsoft.DotNet.ApiCompat - 5.0.0-beta.20166.3
- Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.20166.3
- Microsoft.DotNet.Build.Tasks.Feed - 5.0.0-beta.20166.3
- Microsoft.DotNet.Build.Tasks.Packaging - 5.0.0-beta.20166.3
- Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk - 5.0.0-beta.20166.3
- Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk - 5.0.0-beta.20166.3
- Microsoft.DotNet.CodeAnalysis - 5.0.0-beta.20166.3
- Microsoft.DotNet.GenAPI - 5.0.0-beta.20166.3
- Microsoft.DotNet.GenFacades - 5.0.0-beta.20166.3
- Microsoft.DotNet.Helix.Sdk - 5.0.0-beta.20166.3
- Microsoft.DotNet.RemoteExecutor - 5.0.0-beta.20166.3
- Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.20166.3
* Fix nullability warnings due to new compiler
* Update dependencies from https://github.com/mono/linker build
20200316.4
- ILLink.Tasks - 0.1.6-prerelease.20166.4
* PR Feedback
* Update dependencies from https://github.com/dotnet/arcade build
20200317.1
- Microsoft.DotNet.XUnitExtensions - 5.0.0-beta.20167.1
- Microsoft.DotNet.VersionTools.Tasks - 5.0.0-beta.20167.1
- Microsoft.DotNet.ApiCompat - 5.0.0-beta.20167.1
- Microsoft.DotNet.Arcade.Sdk - 5.0.0-beta.20167.1
- Microsoft.DotNet.Build.Tasks.Feed - 5.0.0-beta.20167.1
- Microsoft.DotNet.Build.Tasks.Packaging - 5.0.0-beta.20167.1
- Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk - 5.0.0-beta.20167.1
- Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk - 5.0.0-beta.20167.1
- Microsoft.DotNet.CodeAnalysis - 5.0.0-beta.20167.1
- Microsoft.DotNet.GenAPI - 5.0.0-beta.20167.1
- Microsoft.DotNet.GenFacades - 5.0.0-beta.20167.1
- Microsoft.DotNet.Helix.Sdk - 5.0.0-beta.20167.1
- Microsoft.DotNet.RemoteExecutor - 5.0.0-beta.20167.1
- Microsoft.DotNet.XUnitConsoleRunner - 2.5.1-beta.20167.1
* Fix nullability warnings in System.Net.Http
* Use ! instead of pragma warning where we can and fix warning in tests build
Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Santiago Fernandez Madero <safern@microsoft.com>
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
- <Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="5.0.0-beta.20162.3">
+ <Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="5.0.0-beta.20167.1">
<Uri>https://github.com/dotnet/arcade</Uri>
- <Sha>16d4350184cf362cd59807b589d1c93803025abc</Sha>
+ <Sha>76778a412f34ee621bf7dcf2aa6e49db0c7a6a46</Sha>
</Dependency>
- <Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="5.0.0-beta.20162.3">
+ <Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="5.0.0-beta.20167.1">
<Uri>https://github.com/dotnet/arcade</Uri>
- <Sha>16d4350184cf362cd59807b589d1c93803025abc</Sha>
+ <Sha>76778a412f34ee621bf7dcf2aa6e49db0c7a6a46</Sha>
</Dependency>
- <Dependency Name="Microsoft.DotNet.ApiCompat" Version="5.0.0-beta.20162.4">
+ <Dependency Name="Microsoft.DotNet.ApiCompat" Version="5.0.0-beta.20167.1">
<Uri>https://github.com/dotnet/arcade</Uri>
- <Sha>16d4350184cf362cd59807b589d1c93803025abc</Sha>
+ <Sha>76778a412f34ee621bf7dcf2aa6e49db0c7a6a46</Sha>
</Dependency>
- <Dependency Name="Microsoft.DotNet.GenAPI" Version="5.0.0-beta.20162.3">
+ <Dependency Name="Microsoft.DotNet.GenAPI" Version="5.0.0-beta.20167.1">
<Uri>https://github.com/dotnet/arcade</Uri>
- <Sha>16d4350184cf362cd59807b589d1c93803025abc</Sha>
+ <Sha>76778a412f34ee621bf7dcf2aa6e49db0c7a6a46</Sha>
</Dependency>
- <Dependency Name="Microsoft.DotNet.GenFacades" Version="5.0.0-beta.20162.3">
+ <Dependency Name="Microsoft.DotNet.GenFacades" Version="5.0.0-beta.20167.1">
<Uri>https://github.com/dotnet/arcade</Uri>
- <Sha>16d4350184cf362cd59807b589d1c93803025abc</Sha>
+ <Sha>76778a412f34ee621bf7dcf2aa6e49db0c7a6a46</Sha>
</Dependency>
- <Dependency Name="Microsoft.DotNet.XUnitExtensions" Version="5.0.0-beta.20162.3">
+ <Dependency Name="Microsoft.DotNet.XUnitExtensions" Version="5.0.0-beta.20167.1">
<Uri>https://github.com/dotnet/arcade</Uri>
- <Sha>16d4350184cf362cd59807b589d1c93803025abc</Sha>
+ <Sha>76778a412f34ee621bf7dcf2aa6e49db0c7a6a46</Sha>
</Dependency>
- <Dependency Name="Microsoft.DotNet.XUnitConsoleRunner" Version="2.5.1-beta.20162.3">
+ <Dependency Name="Microsoft.DotNet.XUnitConsoleRunner" Version="2.5.1-beta.20167.1">
<Uri>https://github.com/dotnet/arcade</Uri>
- <Sha>16d4350184cf362cd59807b589d1c93803025abc</Sha>
+ <Sha>76778a412f34ee621bf7dcf2aa6e49db0c7a6a46</Sha>
</Dependency>
- <Dependency Name="Microsoft.DotNet.Build.Tasks.Packaging" Version="5.0.0-beta.20162.3">
+ <Dependency Name="Microsoft.DotNet.Build.Tasks.Packaging" Version="5.0.0-beta.20167.1">
<Uri>https://github.com/dotnet/arcade</Uri>
- <Sha>16d4350184cf362cd59807b589d1c93803025abc</Sha>
+ <Sha>76778a412f34ee621bf7dcf2aa6e49db0c7a6a46</Sha>
</Dependency>
- <Dependency Name="Microsoft.DotNet.CodeAnalysis" Version="5.0.0-beta.20162.3">
+ <Dependency Name="Microsoft.DotNet.CodeAnalysis" Version="5.0.0-beta.20167.1">
<Uri>https://github.com/dotnet/arcade</Uri>
- <Sha>16d4350184cf362cd59807b589d1c93803025abc</Sha>
+ <Sha>76778a412f34ee621bf7dcf2aa6e49db0c7a6a46</Sha>
</Dependency>
- <Dependency Name="Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk" Version="5.0.0-beta.20162.3">
+ <Dependency Name="Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk" Version="5.0.0-beta.20167.1">
<Uri>https://github.com/dotnet/arcade</Uri>
- <Sha>16d4350184cf362cd59807b589d1c93803025abc</Sha>
+ <Sha>76778a412f34ee621bf7dcf2aa6e49db0c7a6a46</Sha>
</Dependency>
- <Dependency Name="Microsoft.DotNet.RemoteExecutor" Version="5.0.0-beta.20162.3">
+ <Dependency Name="Microsoft.DotNet.RemoteExecutor" Version="5.0.0-beta.20167.1">
<Uri>https://github.com/dotnet/arcade</Uri>
- <Sha>16d4350184cf362cd59807b589d1c93803025abc</Sha>
+ <Sha>76778a412f34ee621bf7dcf2aa6e49db0c7a6a46</Sha>
</Dependency>
- <Dependency Name="Microsoft.DotNet.Build.Tasks.Feed" Version="5.0.0-beta.20162.3">
+ <Dependency Name="Microsoft.DotNet.Build.Tasks.Feed" Version="5.0.0-beta.20167.1">
<Uri>https://github.com/dotnet/arcade</Uri>
- <Sha>16d4350184cf362cd59807b589d1c93803025abc</Sha>
+ <Sha>76778a412f34ee621bf7dcf2aa6e49db0c7a6a46</Sha>
</Dependency>
- <Dependency Name="Microsoft.DotNet.VersionTools.Tasks" Version="5.0.0-beta.20162.3">
+ <Dependency Name="Microsoft.DotNet.VersionTools.Tasks" Version="5.0.0-beta.20167.1">
<Uri>https://github.com/dotnet/arcade</Uri>
- <Sha>16d4350184cf362cd59807b589d1c93803025abc</Sha>
+ <Sha>76778a412f34ee621bf7dcf2aa6e49db0c7a6a46</Sha>
</Dependency>
- <Dependency Name="Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk" Version="5.0.0-beta.20162.3">
+ <Dependency Name="Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk" Version="5.0.0-beta.20167.1">
<Uri>https://github.com/dotnet/arcade</Uri>
- <Sha>16d4350184cf362cd59807b589d1c93803025abc</Sha>
+ <Sha>76778a412f34ee621bf7dcf2aa6e49db0c7a6a46</Sha>
</Dependency>
<Dependency Name="optimization.windows_nt-x64.IBC.CoreFx" Version="99.99.99-master-20190716.1">
<Uri>https://dev.azure.com/dnceng/internal/_git/dotnet-optimization</Uri>
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>e793fcc19797f407a1b7e98d5f81b04e25a551c3</Sha>
</Dependency>
- <Dependency Name="ILLink.Tasks" Version="0.1.6-prerelease.20166.1">
+ <Dependency Name="ILLink.Tasks" Version="0.1.6-prerelease.20166.4">
<Uri>https://github.com/mono/linker</Uri>
- <Sha>b6ff22367395cc62130bafcfb7a0023e7c5d6722</Sha>
+ <Sha>eb2b1c6674a1e881e7baa0cb136a978ee3b39f89</Sha>
</Dependency>
</ToolsetDependencies>
</Dependencies>
</ItemGroup>
<PropertyGroup>
<!-- Arcade dependencies -->
- <MicrosoftDotNetApiCompatVersion>5.0.0-beta.20162.4</MicrosoftDotNetApiCompatVersion>
- <MicrosoftDotNetBuildTasksFeedVersion>5.0.0-beta.20162.3</MicrosoftDotNetBuildTasksFeedVersion>
- <MicrosoftDotNetCodeAnalysisVersion>5.0.0-beta.20162.3</MicrosoftDotNetCodeAnalysisVersion>
- <MicrosoftDotNetGenAPIVersion>5.0.0-beta.20162.3</MicrosoftDotNetGenAPIVersion>
- <MicrosoftDotNetGenFacadesVersion>5.0.0-beta.20162.3</MicrosoftDotNetGenFacadesVersion>
- <MicrosoftDotNetXUnitExtensionsVersion>5.0.0-beta.20162.3</MicrosoftDotNetXUnitExtensionsVersion>
- <MicrosoftDotNetXUnitConsoleRunnerVersion>2.5.1-beta.20162.3</MicrosoftDotNetXUnitConsoleRunnerVersion>
- <MicrosoftDotNetBuildTasksPackagingVersion>5.0.0-beta.20162.3</MicrosoftDotNetBuildTasksPackagingVersion>
- <MicrosoftDotNetRemoteExecutorVersion>5.0.0-beta.20162.3</MicrosoftDotNetRemoteExecutorVersion>
- <MicrosoftDotNetVersionToolsTasksVersion>5.0.0-beta.20162.3</MicrosoftDotNetVersionToolsTasksVersion>
+ <MicrosoftDotNetApiCompatVersion>5.0.0-beta.20167.1</MicrosoftDotNetApiCompatVersion>
+ <MicrosoftDotNetBuildTasksFeedVersion>5.0.0-beta.20167.1</MicrosoftDotNetBuildTasksFeedVersion>
+ <MicrosoftDotNetCodeAnalysisVersion>5.0.0-beta.20167.1</MicrosoftDotNetCodeAnalysisVersion>
+ <MicrosoftDotNetGenAPIVersion>5.0.0-beta.20167.1</MicrosoftDotNetGenAPIVersion>
+ <MicrosoftDotNetGenFacadesVersion>5.0.0-beta.20167.1</MicrosoftDotNetGenFacadesVersion>
+ <MicrosoftDotNetXUnitExtensionsVersion>5.0.0-beta.20167.1</MicrosoftDotNetXUnitExtensionsVersion>
+ <MicrosoftDotNetXUnitConsoleRunnerVersion>2.5.1-beta.20167.1</MicrosoftDotNetXUnitConsoleRunnerVersion>
+ <MicrosoftDotNetBuildTasksPackagingVersion>5.0.0-beta.20167.1</MicrosoftDotNetBuildTasksPackagingVersion>
+ <MicrosoftDotNetRemoteExecutorVersion>5.0.0-beta.20167.1</MicrosoftDotNetRemoteExecutorVersion>
+ <MicrosoftDotNetVersionToolsTasksVersion>5.0.0-beta.20167.1</MicrosoftDotNetVersionToolsTasksVersion>
<!-- Installer dependencies -->
<MicrosoftNETCoreAppVersion>5.0.0-alpha.1.20080.9</MicrosoftNETCoreAppVersion>
<MicrosoftNETCoreDotNetHostVersion>5.0.0-alpha.1.20080.9</MicrosoftNETCoreDotNetHostVersion>
<!-- Docs -->
<MicrosoftPrivateIntellisenseVersion>3.1.0-preview-20200129.1</MicrosoftPrivateIntellisenseVersion>
<!-- ILLink -->
- <ILLinkTasksVersion>0.1.6-prerelease.20166.1</ILLinkTasksVersion>
+ <ILLinkTasksVersion>0.1.6-prerelease.20166.4</ILLinkTasksVersion>
<!-- Mono LLVM -->
<runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>6.0.1-alpha.1.20166.1</runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMSdkVersion>
<runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>6.0.1-alpha.1.20166.1</runtimelinuxx64MicrosoftNETCoreRuntimeMonoLLVMToolsVersion>
- name: _BuildConfig
value: ${{ parameters.configuration }}
- group: Publish-Build-Assets
+ # Skip component governance and codesign validation for SDL. These jobs
+ # create no content.
+ - name: skipComponentGovernanceDetection
+ value: true
+ - name: runCodesignValidationInjection
+ value: false
steps:
- ${{ if and(eq(parameters.runAsPublic, 'false'), ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
value: https://dotnetclimsrc.blob.core.windows.net/dotnet/index.json
- name: InternalInstallersBlobFeedKey
value: $(dotnetclimsrc-access-key)
+
+ # Skip component governance and codesign validation for SDL. These jobs
+ # create no content.
+ - name: skipComponentGovernanceDetection
+ value: true
+ - name: runCodesignValidationInjection
+ value: false
\ No newline at end of file
"python": "2.7.15"
},
"msbuild-sdks": {
- "Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk": "5.0.0-beta.20162.3",
- "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.20162.3",
- "Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk": "5.0.0-beta.20162.3",
- "Microsoft.DotNet.Helix.Sdk": "5.0.0-beta.20162.3",
+ "Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk": "5.0.0-beta.20167.1",
+ "Microsoft.DotNet.Arcade.Sdk": "5.0.0-beta.20167.1",
+ "Microsoft.DotNet.Build.Tasks.SharedFramework.Sdk": "5.0.0-beta.20167.1",
+ "Microsoft.DotNet.Helix.Sdk": "5.0.0-beta.20167.1",
"FIX-85B6-MERGE-9C38-CONFLICT": "1.0.0",
"Microsoft.NET.Sdk.IL": "5.0.0-alpha.1.20076.2",
"Microsoft.Build.NoTargets": "1.0.53",
// Straightforward IEnumerator<T> methods.
//
- internal override bool MoveNext([MaybeNullWhen(false), AllowNull] ref TSource currentElement, ref int currentKey)
+ internal override bool MoveNext([AllowNull] ref TSource currentElement, ref int currentKey)
{
Debug.Assert(_source != null);
// See the LICENSE file in the project root for more information.
using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Internal.Runtime.CompilerServices;
return endIndex - startIndex;
}
- internal bool TryGetReadOnlySequenceSegment(out ReadOnlySequenceSegment<T>? startSegment, out int startIndex, out ReadOnlySequenceSegment<T>? endSegment, out int endIndex)
+ internal bool TryGetReadOnlySequenceSegment([NotNullWhen(true)] out ReadOnlySequenceSegment<T>? startSegment, out int startIndex, [NotNullWhen(true)] out ReadOnlySequenceSegment<T>? endSegment, out int endIndex)
{
object? startObject = _startObject;
return true;
}
- internal bool TryGetString(out string? text, out int start, out int length)
+ internal bool TryGetString([NotNullWhen(true)] out string? text, out int start, out int length)
{
if (typeof(T) != typeof(char) || GetSequenceType() != SequenceType.String)
{
if (GenericHeaderParser.SingleValueAuthenticationParser.TryParseValue(input, null, ref index, out object? output))
{
- parsedValue = (AuthenticationHeaderValue)output;
+ parsedValue = (AuthenticationHeaderValue)output!;
return true;
}
return false;
protected abstract int GetParsedValueLength(string value, int startIndex, object? storeValue,
out object? parsedValue);
+#pragma warning disable CS8765 // Doesn't match overriden member nullable attribute on out parameter
public sealed override bool TryParseValue(string? value, object? storeValue, ref int index,
- [NotNullWhen(true)] out object? parsedValue)
+ out object? parsedValue)
+#pragma warning restore CS8765
{
parsedValue = null;
return (CacheControlHeaderValue)CacheControlHeaderParser.Parser.ParseValue(input, null, ref index);
}
- public static bool TryParse(string? input, [NotNullWhen(true)] out CacheControlHeaderValue? parsedValue)
+ public static bool TryParse(string? input, out CacheControlHeaderValue? parsedValue)
{
int index = 0;
parsedValue = null;
if (CacheControlHeaderParser.Parser.TryParseValue(input, null, ref index, out object? output))
{
- parsedValue = (CacheControlHeaderValue)output;
+ parsedValue = (CacheControlHeaderValue?)output;
return true;
}
return false;
if (GenericHeaderParser.ContentDispositionParser.TryParseValue(input, null, ref index, out object? output))
{
- parsedValue = (ContentDispositionHeaderValue)output;
+ parsedValue = (ContentDispositionHeaderValue)output!;
return true;
}
return false;
if (GenericHeaderParser.ContentRangeParser.TryParseValue(input, null, ref index, out object? output))
{
- parsedValue = (ContentRangeHeaderValue)output;
+ parsedValue = (ContentRangeHeaderValue)output!;
return true;
}
return false;
if (GenericHeaderParser.SingleValueEntityTagParser.TryParseValue(input, null, ref index, out object? output))
{
- parsedValue = (EntityTagHeaderValue)output;
+ parsedValue = (EntityTagHeaderValue)output!;
return true;
}
return false;
if (MediaTypeHeaderParser.SingleValueParser.TryParseValue(input, null, ref index, out object? output))
{
- parsedValue = (MediaTypeHeaderValue)output;
+ parsedValue = (MediaTypeHeaderValue)output!;
return true;
}
return false;
if (MediaTypeHeaderParser.SingleValueWithQualityParser.TryParseValue(input, null, ref index, out object? output))
{
- parsedValue = (MediaTypeWithQualityHeaderValue)output;
+ parsedValue = (MediaTypeWithQualityHeaderValue)output!;
return true;
}
return false;
if (GenericHeaderParser.SingleValueNameValueParser.TryParseValue(input, null, ref index, out object? output))
{
- parsedValue = (NameValueHeaderValue)output;
+ parsedValue = (NameValueHeaderValue)output!;
return true;
}
return false;
if (GenericHeaderParser.SingleValueNameValueWithParametersParser.TryParseValue(input,
null, ref index, out object? output))
{
- parsedValue = (NameValueWithParametersHeaderValue)output;
+ parsedValue = (NameValueWithParametersHeaderValue)output!;
return true;
}
return false;
// See the LICENSE file in the project root for more information.
using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
namespace System.Net.Http.Headers
{
return (ProductHeaderValue)GenericHeaderParser.SingleValueProductParser.ParseValue(input, null, ref index);
}
- public static bool TryParse(string? input, out ProductHeaderValue? parsedValue)
+ public static bool TryParse(string? input, [NotNullWhen(true)] out ProductHeaderValue? parsedValue)
{
int index = 0;
parsedValue = null;
if (GenericHeaderParser.SingleValueProductParser.TryParseValue(input, null, ref index, out object? output))
{
- parsedValue = (ProductHeaderValue)output;
+ parsedValue = (ProductHeaderValue)output!;
return true;
}
return false;
if (GenericHeaderParser.RangeConditionParser.TryParseValue(input, null, ref index, out object? output))
{
- parsedValue = (RangeConditionHeaderValue)output;
+ parsedValue = (RangeConditionHeaderValue)output!;
return true;
}
return false;
if (GenericHeaderParser.RangeParser.TryParseValue(input, null, ref index, out object? output))
{
- parsedValue = (RangeHeaderValue)output;
+ parsedValue = (RangeHeaderValue)output!;
return true;
}
return false;
if (GenericHeaderParser.RetryConditionParser.TryParseValue(input, null, ref index, out object? output))
{
- parsedValue = (RetryConditionHeaderValue)output;
+ parsedValue = (RetryConditionHeaderValue)output!;
return true;
}
return false;
if (GenericHeaderParser.SingleValueStringWithQualityParser.TryParseValue(
input, null, ref index, out object? output))
{
- parsedValue = (StringWithQualityHeaderValue)output;
+ parsedValue = (StringWithQualityHeaderValue)output!;
return true;
}
return false;
if (TransferCodingHeaderParser.SingleValueParser.TryParseValue(input, null, ref index, out object? output))
{
- parsedValue = (TransferCodingHeaderValue)output;
+ parsedValue = (TransferCodingHeaderValue)output!;
return true;
}
return false;
if (TransferCodingHeaderParser.SingleValueWithQualityParser.TryParseValue(
input, null, ref index, out object? output))
{
- parsedValue = (TransferCodingWithQualityHeaderValue)output;
+ parsedValue = (TransferCodingWithQualityHeaderValue)output!;
return true;
}
return false;
if (GenericHeaderParser.SingleValueViaParser.TryParseValue(input, null, ref index, out object? output))
{
- parsedValue = (ViaHeaderValue)output;
+ parsedValue = (ViaHeaderValue)output!;
return true;
}
return false;
if (GenericHeaderParser.SingleValueWarningParser.TryParseValue(input, null, ref index, out object? output))
{
- parsedValue = (WarningHeaderValue)output;
+ parsedValue = (WarningHeaderValue)output!;
return true;
}
return false;
while (AltSvcHeaderParser.Parser.TryParseValue(altSvcHeaderValue, null, ref parseIdx, out object? parsedValue))
{
- var value = (AltSvcHeaderValue)parsedValue;
+ var value = (AltSvcHeaderValue?)parsedValue;
// 'clear' should be the only value present.
if (value == AltSvcHeaderValue.Clear)
break;
}
- if (nextAuthority == null && value.AlpnProtocolName == "h3")
+ if (nextAuthority == null && value != null && value.AlpnProtocolName == "h3")
{
var authority = new HttpAuthority(value.Host!, value.Port);
Debug.Assert(_proxyConfig != null);
if (_currentIndex < _proxyConfig.Length)
{
- bool hasProxy = TryParseProxyConfigPart(_proxyConfig.AsSpan(_currentIndex), _secure, out uri, out int charactersConsumed);
+ bool hasProxy = TryParseProxyConfigPart(_proxyConfig.AsSpan(_currentIndex), _secure, out uri!, out int charactersConsumed);
_currentIndex += charactersConsumed;
Debug.Assert(_currentIndex <= _proxyConfig.Length);
isFinalProxy = _currentIndex == _proxyConfig.Length;
+
return hasProxy;
}
}
}
- public static bool TryOpenExisting(string name, [NotNullWhen(true)] out EventWaitHandle? result)
- {
- return OpenExistingWorker(name, out result) == OpenExistingResult.Success;
- }
+ public static bool TryOpenExisting(string name, [NotNullWhen(true)] out EventWaitHandle? result) =>
+ OpenExistingWorker(name, out result!) == OpenExistingResult.Success;
}
}
}
public static bool TryOpenExisting(string name, [NotNullWhen(true)] out Mutex? result) =>
- OpenExistingWorker(name, out result) == OpenExistingResult.Success;
+ OpenExistingWorker(name, out result!) == OpenExistingResult.Success;
}
}
}
public static bool TryOpenExisting(string name, [NotNullWhen(true)] out Semaphore? result) =>
- OpenExistingWorker(name, out result) == OpenExistingResult.Success;
+ OpenExistingWorker(name, out result!) == OpenExistingResult.Success;
public int Release() => ReleaseCore(1);
// Compare two type names ignoring version
// If a type name is missing assembly, we assume it came from mscorlib
// since this is what Type.GetType will do.
+#pragma warning disable CS8767 // This API member has [AllowNull] implemented interface, but we don't want to accept nulls here.
public bool Equals(string assemblyQualifiedTypeName1, string assemblyQualifiedTypeName2)
+#pragma warning restore CS8767
{
if (assemblyQualifiedTypeName1 == null)
throw new ArgumentNullException(nameof(assemblyQualifiedTypeName1));
internal static bool IsPrimitiveArray(Type? type, [NotNullWhen(true)] out object? typeInformation)
{
- bool bIsPrimitive = true;
-
if (ReferenceEquals(type, s_typeofBooleanArray)) typeInformation = InternalPrimitiveTypeE.Boolean;
else if (ReferenceEquals(type, s_typeofByteArray)) typeInformation = InternalPrimitiveTypeE.Byte;
else if (ReferenceEquals(type, s_typeofCharArray)) typeInformation = InternalPrimitiveTypeE.Char;
else
{
typeInformation = null;
- bIsPrimitive = false;
+ return false;
}
- return bIsPrimitive;
+ return true;
}
private static void InitValueA()
return false;
}
- bool ret = VerifyData(data);
-
- if (ret)
+ if (VerifyData(data))
{
signerCertificate = cert;
+ return true;
}
- return ret;
+ return false;
}
public bool VerifySignatureForHash(
return false;
}
- bool ret = VerifyHash(hash, PkcsHelpers.GetOidFromHashAlgorithm(hashAlgorithm));
-
- if (ret)
+ if (VerifyHash(hash, PkcsHelpers.GetOidFromHashAlgorithm(hashAlgorithm)))
{
signerCertificate = cert;
+ return true;
}
- return ret;
+ return false;
}
public bool VerifySignatureForHash(
return false;
}
- bool ret = VerifyHash(hash, hashAlgorithmId.Value);
-
- if (ret)
+ if (VerifyHash(hash, hashAlgorithmId.Value))
{
// REVIEW: Should this return the cert, or new X509Certificate2(cert.RawData)?
// SignedCms.SignerInfos builds new objects each call, which makes
// ReferenceEquals(cms.SignerInfos[0].Certificate, cms.SignerInfos[0].Certificate) be false.
// So maybe it's weird to give back a cert we've copied from that?
signerCertificate = cert;
+ return true;
}
- return ret;
+ return false;
}
public bool VerifySignatureForSignerInfo(
private static bool TryReadPkcs7Der(
byte[] rawData,
bool single,
- [NotNullWhen(true)] out ICertificatePal? certPal,
+ out ICertificatePal? certPal,
[NotNullWhen(true)] out List<ICertificatePal>? certPals)
{
using (SafePkcs7Handle pkcs7 = Interop.Crypto.DecodePkcs7(rawData, rawData.Length))
SafePkcs7Handle pkcs7,
bool single,
out ICertificatePal? certPal,
- out List<ICertificatePal> certPals)
+ [NotNullWhen(true)] out List<ICertificatePal> certPals)
{
List<ICertificatePal>? readPals = single ? null : new List<ICertificatePal>();
throw new CryptographicException(SR.Cryptography_X509_PKCS7_NoSigner);
}
- Debug.Assert(readPals != null); // null iff single == true
+ Debug.Assert(readPals != null); // null if single == true
for (int i = 0; i < count; i++)
{
bool single,
out ICertificatePal? readPal,
out List<ICertificatePal>? readCerts,
- [NotNullWhen(false)] out Exception? openSslException)
+ out Exception? openSslException)
{
// DER-PKCS12
OpenSslPkcs12Reader? pfx;
utf8Unescaped = utf8Unescaped.Slice(0, written);
Debug.Assert(!utf8Unescaped.IsEmpty);
- bool result = TryDecodeBase64InPlace(utf8Unescaped, out bytes);
+ bool result = TryDecodeBase64InPlace(utf8Unescaped, out bytes!);
if (unescapedArray != null)
{
utf8Unescaped.Clear();
ArrayPool<byte>.Shared.Return(unescapedArray);
}
-
return result;
}
}
// Provide a default implementation for value converters.
- internal virtual bool OnTryRead(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options, ref ReadStack state, out T value)
+ internal virtual bool OnTryRead(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options, ref ReadStack state, [MaybeNullWhen(false)] out T value)
{
value = Read(ref reader, typeToConvert, options);
return true;