34 references to GetValueOrDefault
Aspire.Hosting (5)
ApplicationModel\CertificateTrustExecutionConfigurationGatherer.cs (2)
53trustDevCert = caAnnotation.TrustDeveloperCertificates.GetValueOrDefault(trustDevCert); 54additionalData.Scope = caAnnotation.Scope.GetValueOrDefault(additionalData.Scope);
ApplicationModel\HttpsCertificateExecutionConfigurationGatherer.cs (1)
42if (effectiveAnnotation.UseDeveloperCertificate.GetValueOrDefault(developerCertificateService.UseForHttps))
Dashboard\DashboardEventHandlers.cs (1)
432trustDeveloperCertificate = certificateAuthorityAnnotation.TrustDeveloperCertificates.GetValueOrDefault(trustDeveloperCertificate);
ResourceBuilderExtensions.cs (1)
4338else if (annotation.UseDeveloperCertificate.GetValueOrDefault(developerCertificateService.UseForHttps) || annotation.Certificate is not null)
Aspire.Hosting.Tests (3)
DistributedApplicationTests.cs (3)
2026Assert.Single(networks, n => n.Spec.Persistent.GetValueOrDefault(false) == false); 2066Assert.False(dcpContainer.Spec.Start.GetValueOrDefault(true)); 2075Assert.False(dcpExecutable.Spec.Start.GetValueOrDefault(true));
Microsoft.AspNetCore.Components.QuickGrid (1)
Pagination\Paginator.razor.cs (1)
51private Task GoLastAsync() => GoToPageAsync(State.LastPageIndex.GetValueOrDefault(0));
Microsoft.AspNetCore.Components.WebAssembly.Server (1)
ContentEncodingNegotiator.cs (1)
59var quality = encoding.Quality.GetValueOrDefault(1);
Microsoft.AspNetCore.ResponseCompression (1)
ResponseCompressionProvider.cs (1)
100var quality = encoding.Quality.GetValueOrDefault(1);
Microsoft.Build.Tasks.Core (1)
ResourceHandling\MSBuildResXReader.cs (1)
327return ReadResources(x, basePath, useRelativePath.GetValueOrDefault(basePath != null), log, logWarningForBinaryFormatter);
Microsoft.CodeAnalysis.CSharp (2)
FlowAnalysis\RegionReachableWalker.cs (2)
26startPointIsReachable = badRegion || walker._regionStartPointIsReachable.GetValueOrDefault(true); 27endPointIsReachable = badRegion || walker._regionEndPointIsReachable.GetValueOrDefault(walker.State.Alive);
Microsoft.CodeAnalysis.NetAnalyzers (2)
Microsoft.NetCore.Analyzers\InteropServices\PlatformCompatibilityAnalyzer.cs (2)
874if (pAttribute.SupportedFirst != null && supportedRule.GetValueOrDefault(true)) 936return supportedRule.GetValueOrDefault(true);
Microsoft.CodeAnalysis.Razor.Compiler (1)
Language\Components\ComponentWhitespacePass.cs (1)
90var position = startIndex.GetValueOrDefault(direction == TraversalDirection.Forwards ? 0 : nodes.Count - 1);
Microsoft.Extensions.AI.OpenAI (1)
OpenAIHostedFileClient.cs (1)
400length = httpContent.Headers.ContentLength.GetValueOrDefault(-1);
Microsoft.ML.Core (1)
Utilities\SubsetStream.cs (1)
46_remaining = length.GetValueOrDefault(-1);
Microsoft.ML.Data (1)
DataLoadSave\Binary\BinarySaver.cs (1)
761int maxRowsPerBlock = _maxRowsPerBlock.GetValueOrDefault(int.MaxValue);
PresentationFramework (3)
System\Windows\Controls\Calendar.cs (3)
667return this.DisplayDateEnd.GetValueOrDefault(DateTime.MaxValue); 675return this.DisplayDateStart.GetValueOrDefault(DateTime.MinValue); 681get { return _currentDate.GetValueOrDefault(this.DisplayDateInternal); }
ReachFramework (2)
AlphaFlattener\MetroDevice.cs (2)
514m_PageWidth = capabilities.OrientedPageMediaWidth.GetValueOrDefault(816); 515m_PageHeight = capabilities.OrientedPageMediaHeight.GetValueOrDefault(1056);
System.Net.Http (1)
System\Net\Http\SocketsHttpHandler\Http2Stream.cs (1)
210using var writeStream = new Http2WriteStream(this, _request.Content.Headers.ContentLength.GetValueOrDefault(-1));
System.Security.Cryptography (6)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Oids.Shared.cs (1)
84Asn1Tag expected = expectedTag.GetValueOrDefault(Asn1Tag.ObjectIdentifier);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\X509Certificates\X509CertificateLoader.Pkcs12.cs (3)
425int oldCount = (bag.BagAttributes?.Length).GetValueOrDefault(0); 918_certBags = ArrayPool<SafeBagAsn>.Shared.Rent(loaderLimits.MaxCertificates.GetValueOrDefault(10)); 919_keyBags = ArrayPool<SafeBagAsn>.Shared.Rent(loaderLimits.MaxKeys.GetValueOrDefault(10));
System\Security\Cryptography\X509Certificates\CertificateRevocationListBuilder.Build.cs (2)
121thisUpdate.GetValueOrDefault(DateTimeOffset.UtcNow), 321thisUpdate.GetValueOrDefault(DateTimeOffset.UtcNow),
System.Security.Cryptography.Pkcs (1)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\Oids.Shared.cs (1)
84Asn1Tag expected = expectedTag.GetValueOrDefault(Asn1Tag.ObjectIdentifier);
System.Xaml (1)
System\Xaml\Schema\MemberReflector.cs (1)
154set { _designerSerializationVisibility = value.GetValueOrDefault(VisibilityNone); }