Update documentation for returns of indexer in IRequestCookieCollection when key is not present (#24497)

This commit is contained in:
Roman Marusyk 2020-08-06 05:36:07 +03:00 committed by GitHub
parent 8cbe97df4b
commit a28c2b62dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -73,14 +73,14 @@ namespace Microsoft.AspNetCore.Http
/// The key of the value to get.
/// </param>
/// <returns>
/// The element with the specified key, or <c>string.Empty</c> if the key is not present.
/// The element with the specified key, or <c>null</c> if the key is not present.
/// </returns>
/// <exception cref="System.ArgumentNullException">
/// key is null.
/// </exception>
/// <remarks>
/// <see cref="IRequestCookieCollection" /> has a different indexer contract than
/// <see cref="IDictionary{TKey, TValue}" />, as it will return <c>string.Empty</c> for missing entries
/// <see cref="IDictionary{TKey, TValue}" />, as it will return <c>null</c> for missing entries
/// rather than throwing an Exception.
/// </remarks>
string? this[string key] { get; }