Smalls1652/SmallsOnline.AVD.ResourceManager

Fix null reference issues

Smalls1652 opened this issue · 0 comments

There are currently 5 warnings being generated on build due to not handling possible null values correctly.

Affected lines in code:

return (T)systemTextJsonSerializer.Deserialize(stream, typeof(T), default);

VirtualMachine virtualMachine = _azureApiService.GetAzVM(sessionHostItem.Properties?.ResourceId);

avdHostData = _cosmosDbService.GetAvdHost(sessionHostItem.Properties?.ObjectId);