msgraph-sdk-dotnet icon indicating copy to clipboard operation
msgraph-sdk-dotnet copied to clipboard

Make it easier to lookup changed properties with DeltaResponseHandler

Open MIchaelMainer opened this issue 4 years ago • 0 comments

Change depends on https://github.com/microsoftgraph/msgraph-sdk-dotnet-core/pull/58 getting published to NuGet.

Add an extension method on entities that support delta query to provide a HashSet of changed properties.

Returns a HashSet where every value is not case sensitive.

var changes = myevent.GetChangeHashSet(); // this should make the first
if (changes.Contains(nameof(myevent.Subject)))
{ 
    // myevent.Subject has been updated, so if its value is null, 
    // you know it has been changed to null.
}

AB#7263

MIchaelMainer avatar Dec 14 '19 00:12 MIchaelMainer