1- // ------------------------------------------------------------------------------
1+ // ------------------------------------------------------------------------------
22// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
33// ------------------------------------------------------------------------------
44
@@ -32,7 +32,7 @@ public interface IRequestAdapter
3232 /// <param name="errorMapping">The error factories mapping to use in case of a failed request.</param>
3333 /// <param name="cancellationToken">The <see cref="CancellationToken"/> to use for cancelling the requests.</param>
3434 /// <returns>The deserialized response model.</returns>
35- Task < ModelType > SendAsync < ModelType > ( RequestInformation requestInfo , ParsableFactory < ModelType > factory , Dictionary < string , ParsableFactory < IParsable > > errorMapping = default , CancellationToken cancellationToken = default ) where ModelType : IParsable ;
35+ Task < ModelType ? > SendAsync < ModelType > ( RequestInformation requestInfo , ParsableFactory < ModelType > factory , Dictionary < string , ParsableFactory < IParsable > > ? errorMapping = default , CancellationToken cancellationToken = default ) where ModelType : IParsable ;
3636 /// <summary>
3737 /// Executes the HTTP request specified by the given RequestInformation and returns the deserialized response model collection.
3838 /// </summary>
@@ -41,42 +41,42 @@ public interface IRequestAdapter
4141 /// <param name="errorMapping">The error factories mapping to use in case of a failed request.</param>
4242 /// <param name="cancellationToken">The <see cref="CancellationToken"/> to use for cancelling the requests.</param>
4343 /// <returns>The deserialized response model collection.</returns>
44- Task < IEnumerable < ModelType > > SendCollectionAsync < ModelType > ( RequestInformation requestInfo , ParsableFactory < ModelType > factory , Dictionary < string , ParsableFactory < IParsable > > errorMapping = default , CancellationToken cancellationToken = default ) where ModelType : IParsable ;
44+ Task < IEnumerable < ModelType > ? > SendCollectionAsync < ModelType > ( RequestInformation requestInfo , ParsableFactory < ModelType > factory , Dictionary < string , ParsableFactory < IParsable > > ? errorMapping = default , CancellationToken cancellationToken = default ) where ModelType : IParsable ;
4545 /// <summary>
4646 /// Executes the HTTP request specified by the given RequestInformation and returns the deserialized primitive response model.
4747 /// </summary>
4848 /// <param name="requestInfo">The RequestInformation object to use for the HTTP request.</param>
4949 /// <param name="errorMapping">The error factories mapping to use in case of a failed request.</param>
5050 /// <param name="cancellationToken">The <see cref="CancellationToken"/> to use for cancelling the requests.</param>
5151 /// <returns>The deserialized primitive response model.</returns>
52- Task < ModelType > SendPrimitiveAsync < ModelType > ( RequestInformation requestInfo , Dictionary < string , ParsableFactory < IParsable > > errorMapping = default , CancellationToken cancellationToken = default ) ;
52+ Task < ModelType ? > SendPrimitiveAsync < ModelType > ( RequestInformation requestInfo , Dictionary < string , ParsableFactory < IParsable > > ? errorMapping = default , CancellationToken cancellationToken = default ) ;
5353 /// <summary>
5454 /// Executes the HTTP request specified by the given RequestInformation and returns the deserialized primitive response model collection.
5555 /// </summary>
5656 /// <param name="requestInfo">The RequestInformation object to use for the HTTP request.</param>
5757 /// <param name="errorMapping">The error factories mapping to use in case of a failed request.</param>
5858 /// <param name="cancellationToken">The <see cref="CancellationToken"/> to use for cancelling the requests.</param>
5959 /// <returns>The deserialized primitive response model collection.</returns>
60- Task < IEnumerable < ModelType > > SendPrimitiveCollectionAsync < ModelType > ( RequestInformation requestInfo , Dictionary < string , ParsableFactory < IParsable > > errorMapping = default , CancellationToken cancellationToken = default ) ;
60+ Task < IEnumerable < ModelType > ? > SendPrimitiveCollectionAsync < ModelType > ( RequestInformation requestInfo , Dictionary < string , ParsableFactory < IParsable > > ? errorMapping = default , CancellationToken cancellationToken = default ) ;
6161 /// <summary>
6262 /// Executes the HTTP request specified by the given RequestInformation with no return content.
6363 /// </summary>
6464 /// <param name="requestInfo">The RequestInformation object to use for the HTTP request.</param>
6565 /// <param name="errorMapping">The error factories mapping to use in case of a failed request.</param>
6666 /// <param name="cancellationToken">The <see cref="CancellationToken"/> to use for cancelling the requests.</param>
6767 /// <returns>A Task to await completion.</returns>
68- Task SendNoContentAsync ( RequestInformation requestInfo , Dictionary < string , ParsableFactory < IParsable > > errorMapping = default , CancellationToken cancellationToken = default ) ;
68+ Task SendNoContentAsync ( RequestInformation requestInfo , Dictionary < string , ParsableFactory < IParsable > > ? errorMapping = default , CancellationToken cancellationToken = default ) ;
6969 /// <summary>
7070 /// The base url for every request.
7171 /// </summary>
72- string BaseUrl { get ; set ; }
72+ string ? BaseUrl { get ; set ; }
7373 /// <summary>
7474 /// Converts the given RequestInformation into a native HTTP request used by the implementing adapter.
7575 /// </summary>
7676 /// <typeparam name="T">The type of the native request.</typeparam>
7777 /// <param name="requestInfo">The RequestInformation object to use for the HTTP request.</param>
7878 /// <param name="cancellationToken">The <see cref="CancellationToken"/> to use for cancelling the requests.</param>
7979 /// <returns>The native HTTP request.</returns>
80- Task < T > ConvertToNativeRequestAsync < T > ( RequestInformation requestInfo , CancellationToken cancellationToken = default ) ;
80+ Task < T ? > ConvertToNativeRequestAsync < T > ( RequestInformation requestInfo , CancellationToken cancellationToken = default ) ;
8181 }
8282}
0 commit comments