-
Notifications
You must be signed in to change notification settings - Fork 51
/
Copy pathBaseGraphRequestAdapter.cs
31 lines (29 loc) · 1.8 KB
/
BaseGraphRequestAdapter.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
namespace Microsoft.Graph
{
using Microsoft.Kiota.Abstractions;
using Microsoft.Kiota.Abstractions.Authentication;
using Microsoft.Kiota.Abstractions.Serialization;
using Microsoft.Kiota.Http.HttpClientLibrary;
using System.Net.Http;
/// <summary>
/// The <see cref="IRequestAdapter"/> instance for use with microsoft graph
/// </summary>
public class BaseGraphRequestAdapter : HttpClientRequestAdapter
{
/// <summary>
/// The public constructor for <see cref="BaseGraphRequestAdapter"/>
/// </summary>
/// <param name="authenticationProvider">The authentication provider.</param>
/// <param name="graphClientOptions">The options for the graph client</param>
/// <param name="parseNodeFactory">The parse node factory.</param>
/// <param name="serializationWriterFactory">The serialization writer factory.</param>
/// <param name="httpClient">The native HTTP client.</param>
public BaseGraphRequestAdapter(IAuthenticationProvider authenticationProvider, GraphClientOptions graphClientOptions = null, IParseNodeFactory parseNodeFactory = null, ISerializationWriterFactory serializationWriterFactory = null, HttpClient httpClient = null)
: base(authenticationProvider, parseNodeFactory ?? ParseNodeFactoryRegistry.DefaultInstance, serializationWriterFactory ?? SerializationWriterFactoryRegistry.DefaultInstance, httpClient ?? GraphClientFactory.Create(graphClientOptions))
{
}
}
}