Skip to content
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

Improve nullability of COM Angenbotsteil.Positionen and COM Angebotspositionen itself #477

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions BO4E/COM/Angebotsposition.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#nullable enable
using BO4E.ENUM;
using BO4E.meta;

Expand All @@ -17,11 +18,11 @@ namespace BO4E.COM;
public class Angebotsposition : COM
{
/// <summary>Bezeichnung der jeweiligen Position des Angebotsteils.</summary>
[JsonProperty(PropertyName = "positionsbezeichung", Required = Required.Always, Order = 10)]
[JsonProperty(PropertyName = "positionsbezeichung", Required = Required.Default, Order = 10)]
[JsonPropertyName("positionsbezeichung")]
[JsonPropertyOrder(10)]
[ProtoMember(3)]
public string Positionsbezeichung { get; set; }
public string? Positionsbezeichung { get; set; }

/// <summary>
/// Summe der Verbräuche (z.B. in kWh), die zu dieser Angebotsposition gehören. Details <see cref="Menge" />
Expand Down
7 changes: 4 additions & 3 deletions BO4E/COM/Angebotsteil.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#nullable enable
using System.Collections.Generic;
using System.Text.Json.Serialization;
using BO4E.BO;
Expand Down Expand Up @@ -50,16 +51,16 @@ public class Angebotsteil : COM
public Betrag? Gesamtkostenangebotsteil { get; set; }

/// <summary>Einzelne Positionen, die zu diesem Angebotsteil gehören. Details <see cref="Angebotsposition" /></summary>
[JsonProperty(PropertyName = "positionen", Order = 14, Required = Required.Always)]
[JsonProperty(PropertyName = "positionen", Order = 14, Required = Required.Default)]
[JsonPropertyName("positionen")]
[JsonPropertyOrder(14)]
[ProtoMember(7)]
public List<Angebotsposition> Positionen { get; set; }
public List<Angebotsposition>? Positionen { get; set; }

/// <summary>Hier kann der Belieferungszeitraum angegeben werden, für den dieser Angebotsteil gilt. Details <see cref="Zeitraum" /></summary>
[JsonProperty(PropertyName = "lieferzeitraum", Order = 15, Required = Required.Default)]
[JsonPropertyName("lieferzeitraum")]
[JsonPropertyOrder(15)]
[ProtoMember(8)]
public Zeitraum? Lieferzeitraum { get; set; }
}
}
Loading