-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Start trying to remove graph api sdk dependency #1003
base: dev
Are you sure you want to change the base?
Conversation
var subscriptionModel = MapGraphEntityToModel(subscription); | ||
return subscriptionModel; | ||
}).GetAwaiter().GetResult(); | ||
var response = JToken.Parse(responseAsString); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Converting string to Model seems like it could be an extension method?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also tagging @KoenZomers as he wrote a lot of the original code
var subscriptionModel = MapGraphEntityToModel(subscription); | ||
return subscriptionModel; | ||
}).GetAwaiter().GetResult(); | ||
var response = JToken.Parse(responseAsString); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@quails4Eva : would recommend using System.Text.Json over Newtonsoft
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I've done this. I copied the newtonsoft code from elsewhere in the project, but I think this should be equivalent for system.text.json . It needed the package version updating for .net standard. I've changed it to use the same version for each target framework as I don't think system.text.json is tied to framework versions as some other packages are
Next time I have some free time to look at this I'll try and replace the other usages in SubscriptionsUtility |
I started adding some async http bits to maintain where async was already being used, but then I realised that the async usage was all wrapped in Task.Run so probably not really helping anything. I can undo that if you'd rather it be put back. |
@jansenbe I'm looking at what's needed to replace the graph api sdk usage in the UsersUtility class and I think it would involve copying a bunch of dto classes from the graph sdk as currently these can be selected in as additional properties. I can do this, but I'm wondering how much value the methods on this class add as they just seem to be light wrappers over the underlying graph sdk methods? |
Reduce dependency on Microsoft.Graph NuGet package
Based on discussion in #660
#660 (comment)