Created
May 20, 2020 01:12
-
-
Save cmatskas/701080780127e73eccb2d3b576bb081b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.Graph; | |
namespace GraphServiceApi | |
{ | |
public class GraphClient | |
{ | |
private GraphServiceClient serviceClient; | |
public GraphServiceClient ServiceClient | |
{ | |
get | |
{ | |
if (serviceClient != null) | |
{ | |
return serviceClient; | |
} | |
serviceClient = new GraphServiceClient(AuthenticationProvider.AuthProvider); | |
return serviceClient; | |
} | |
} | |
public GraphClientAuthProvider AuthenticationProvider { get; } | |
public GraphClient(GraphClientAuthProvider authProvider) | |
{ | |
AuthenticationProvider = authProvider; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment