59 references to HasValue
Microsoft.AspNetCore.Authentication.Test (2)
WsFederation\WsFederationTest.cs (1)
267if (cookie.Value.HasValue)
WsFederation\WsFederationTest_Handler.cs (1)
265if (cookie.Value.HasValue)
Microsoft.AspNetCore.Grpc.JsonTranscoding (1)
Internal\JsonRequestHelpers.cs (1)
79return charset.HasValue ? Encoding.GetEncoding(charset.Value) : null;
Microsoft.AspNetCore.Http.Extensions (1)
HttpRequestJsonExtensions.cs (1)
338return charset.HasValue ? Encoding.GetEncoding(charset.Value) : null;
Microsoft.AspNetCore.Mvc.Core (13)
Formatters\AcceptHeaderParser.cs (2)
35if (output.MediaType.HasValue) 156if (result.MediaType.HasValue)
Formatters\MediaType.cs (2)
210if (charset.HasValue && charset.Equals(encoding.WebName, StringComparison.OrdinalIgnoreCase)) 215if (!charset.HasValue)
Formatters\OutputFormatter.cs (1)
111if (!context.ContentType.HasValue)
Formatters\TextInputFormatter.cs (1)
86if (requestMediaType.Charset.HasValue)
Formatters\TextOutputFormatter.cs (3)
81if (context.ContentType.HasValue) 85if (contentTypeCharset.HasValue) 108if (!selectedMediaType.HasValue)
Infrastructure\ObjectResultExecutor.cs (1)
166if (context.ContentType.HasValue)
src\Shared\MediaType\ReadOnlyMediaTypeHeaderValue.cs (3)
361return charset.HasValue ? Encoding.GetEncoding(charset.Value) : null; 382if (set.SubTypeSuffix.HasValue) 384if (SubTypeSuffix.HasValue)
Microsoft.AspNetCore.Mvc.Core.Test (1)
Formatters\MediaTypeTest.cs (1)
178Assert.False(result.HasValue);
Microsoft.AspNetCore.Mvc.Core.TestCommon (4)
MediaTypeAssert.cs (4)
29if (!left.HasValue && !right.HasValue) 33else if (!left.HasValue || !right.HasValue)
Microsoft.AspNetCore.Mvc.TagHelpers (5)
EnvironmentTagHelper.cs (3)
94if (environment.HasValue && environment.Length > 0) 113if (environment.HasValue && environment.Length > 0) 131if (environment.HasValue && environment.Length > 0)
GlobbingUrlBuilder.cs (2)
271if (enumerator.Current.HasValue && enumerator.Current.Length > 0) 285if (!value.HasValue || value.Length == 0)
Microsoft.AspNetCore.Routing (4)
Matching\AcceptsMatcherPolicy.cs (1)
296if (!mediaType.Type.HasValue)
src\Shared\MediaType\ReadOnlyMediaTypeHeaderValue.cs (3)
361return charset.HasValue ? Encoding.GetEncoding(charset.Value) : null; 382if (set.SubTypeSuffix.HasValue) 384if (SubTypeSuffix.HasValue)
Microsoft.AspNetCore.WebUtilities (1)
FileMultipartSection.cs (1)
42_contentDispositionHeader.FileNameStar.HasValue ?
Microsoft.Extensions.Primitives (22)
StringSegment.cs (20)
82public string? Value => HasValue ? Buffer.Substring(Offset, Length) : null; 131if (!HasValue || start < 0) 153if (!HasValue || start < 0 || length < 0 || (uint)(start + length) > (uint)Length) 181if (a.HasValue && b.HasValue) 188return !a.HasValue ? (b.HasValue ? -1 : 0) : 1; // null sorts less than non-null, and two nulls sort as equal 217if (HasValue && other.HasValue) 224return !HasValue && !other.HasValue; // only return true if both are null 256if (!HasValue || text == null) 338if (!HasValue) 364if (!HasValue) 400if (!HasValue || offset < 0 || length < 0 || (uint)(offset + length) > (uint)Length) 433if (!HasValue || offset < 0 || length < 0 || (uint)(offset + length) > (uint)Length) 458if (HasValue) 521if (HasValue) 648if (!value.HasValue || value.Length == 0) 706throw GetInvalidArgumentsException(HasValue);
StringTokenizer.cs (2)
46if (!value.HasValue) 119if (!_value.HasValue || _index > _value.Length)
Microsoft.Net.Http.Headers (5)
MediaTypeHeaderValue.cs (5)
117if (charset.HasValue && !StringSegment.IsNullOrEmpty(charset)) 690if (set.Suffix.HasValue) 692if (Suffix.HasValue) 730if (Suffix.HasValue) 732if (suffix.HasValue)