Download data/DWSIM.Simulate365/GraphClientFactory.cs from introvoyz041/Dwsim: direct link, hf CLI and curl.
- Browser
- Download file 671 Bytes
-
https://huggingface.co/datasets/introvoyz041/Dwsim/resolve/main/data/DWSIM.Simulate365/GraphClientFactory.cs
- Command line
-
hf download hf://datasets/introvoyz041/Dwsim/data/DWSIM.Simulate365/GraphClientFactory.cs
-
curl -L -o GraphClientFactory.cs https://huggingface.co/datasets/introvoyz041/Dwsim/resolve/main/data/DWSIM.Simulate365/GraphClientFactory.cs
671 Bytes
| using Microsoft.Graph; | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Net.Http.Headers; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| namespace DWSIM.Simulate365 | |
| { | |
| public class GraphClientFactory | |
| { | |
| public static GraphServiceClient CreateClient(string accessToken) | |
| { | |
| return new GraphServiceClient(new DelegateAuthenticationProvider((requestMessage) => | |
| { | |
| requestMessage | |
| .Headers | |
| .Authorization = new AuthenticationHeaderValue("Bearer", accessToken); | |
| return Task.FromResult(0); | |
| })); | |
| } | |
| } | |
| } | |