Skip to content

Commit

Permalink
Merge pull request #11 from hughesjs/fix-nullability-warnings
Browse files Browse the repository at this point in the history
Fixed some nullability issues
  • Loading branch information
hughesjs authored May 6, 2024
2 parents e2ec160 + c0fb0f8 commit 9bae752
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/UniversalDiveDataFormat/Models/Camera.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace UniversalDiveDataFormat.Models;
public class Camera: UddfModel, ILinkable
{
[XmlAttribute("id")]
public required string Id{ get; init; }
public string? Id { get; init; }

[XmlElement("body")]
public required Body Body { get; init; }
Expand Down
2 changes: 1 addition & 1 deletion src/UniversalDiveDataFormat/Models/Guide.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace UniversalDiveDataFormat.Models;
public class Guide: UddfModel, ILinkable
{
[XmlAttribute("id")]
public string Id { get; init; }
public string? Id { get; init; }

[XmlElement("link")]
public Link? Link { get; init; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ namespace UniversalDiveDataFormat.Models;
public class SetDiveComputerAlarmTime: UddfModel
{
[XmlElement("datetime")]
public DateTime DateTime { get; init; }
public required DateTime DateTime { get; init; }

[XmlElement("dcalarm")]
public DiveComputerAlarm DiveComputerAlarm { get; init; }
public required DiveComputerAlarm DiveComputerAlarm { get; init; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ namespace UniversalDiveDataFormat.Models;
public class SetDiveComputerDiveSiteData: UddfModel
{
[XmlAttribute("divesite")]
public string DiveSiteId { get; init; }
public required string DiveSiteId { get; init; }
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ namespace UniversalDiveDataFormat.Models;
public class SetDiveComputerPartialPressureOfO2Alarm: UddfModel
{
[XmlElement("dcalarm")]
public DiveComputerAlarm DiveComputerAlarm { get; init; }
public required DiveComputerAlarm DiveComputerAlarm { get; init; }

[XmlElement("maximumpo2")]
public float? MaximumPartialPressureOfO2InBars { get; init; }
public required float MaximumPartialPressureOfO2InBars { get; init; }
}

0 comments on commit 9bae752

Please sign in to comment.