Nullverweise warnings bereinigt

This commit is contained in:
2023-08-08 11:58:09 +02:00
parent 4af2bae8cd
commit ee6eb210b7
22 changed files with 125 additions and 102 deletions

View File

@@ -15,14 +15,14 @@ namespace ConsoleApp3.DataContracts
public int? Id { get; set; }
[JsonProperty(PropertyName = "objectName")]
public string ObjectName { get; set; }
public string ObjectName { get; set; } = "";
/// <summary>
///
/// </summary>
/// <value></value>
[DataMember(Name = "invoiceNumber", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "invoiceNumber")]
public string InvoiceNumber { get; set; }
public string InvoiceNumber { get; set; } = "";
/// <summary>
/// the contact the invoice belongs to
@@ -30,7 +30,7 @@ namespace ConsoleApp3.DataContracts
/// <value>the contact the invoice belongs to</value>
[DataMember(Name = "contact", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "contact")]
public ModelContact Contact { get; set; }
public ModelContact? Contact { get; set; }
/// <summary>
/// the date the invoice was created
@@ -62,7 +62,7 @@ namespace ConsoleApp3.DataContracts
/// <value>header/subject of the invoice</value>
[DataMember(Name = "header", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "header")]
public string Header { get; set; }
public string Header { get; set; } = "";
/// <summary>
/// head text of the invoice
@@ -70,7 +70,7 @@ namespace ConsoleApp3.DataContracts
/// <value>head text of the invoice</value>
[DataMember(Name = "headText", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "headText")]
public string HeadText { get; set; }
public string HeadText { get; set; } = "";
/// <summary>
/// foot text of the invoice
@@ -78,7 +78,7 @@ namespace ConsoleApp3.DataContracts
/// <value>foot text of the invoice</value>
[DataMember(Name = "footText", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "footText")]
public string FootText { get; set; }
public string FootText { get; set; } = "";
/// <summary>
/// time left for paying the invoice, use format dd.MM.yyyy or number for number of days left
@@ -110,7 +110,7 @@ namespace ConsoleApp3.DataContracts
/// <value>the name in the address, equals the contacts name</value>
[DataMember(Name = "addressName", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "addressName")]
public string AddressName { get; set; }
public string AddressName { get; set; } = "";
/// <summary>
/// the street in the address, equals the contacts street
@@ -118,7 +118,7 @@ namespace ConsoleApp3.DataContracts
/// <value>the street in the address, equals the contacts street</value>
[DataMember(Name = "addressStreet", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "addressStreet")]
public string AddressStreet { get; set; }
public string AddressStreet { get; set; } = "";
/// <summary>
/// the zip-code in the address, equals the contacts zip
@@ -126,7 +126,7 @@ namespace ConsoleApp3.DataContracts
/// <value>the zip-code in the address, equals the contacts zip</value>
[DataMember(Name = "addressZip", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "addressZip")]
public string AddressZip { get; set; }
public string AddressZip { get; set; } = "";
/// <summary>
/// the city in the address, equals the contacts city
@@ -134,7 +134,7 @@ namespace ConsoleApp3.DataContracts
/// <value>the city in the address, equals the contacts city</value>
[DataMember(Name = "addressCity", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "addressCity")]
public string AddressCity { get; set; }
public string AddressCity { get; set; } = "";
/// <summary>
/// the country in the address, equals the contacts country
@@ -142,7 +142,7 @@ namespace ConsoleApp3.DataContracts
/// <value>the country in the address, equals the contacts country</value>
[DataMember(Name = "addressCountry", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "addressCountry")]
public ModelStaticCountry AddressCountry { get; set; }
public ModelStaticCountry? AddressCountry { get; set; }
/// <summary>
/// time left for paying the invoice, use format DD.MM.YYYY or number for number of days left
@@ -158,7 +158,7 @@ namespace ConsoleApp3.DataContracts
/// <value>SevUser who created the invoice</value>
[DataMember(Name = "createUser", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "createUser")]
public ModelSevUser CreateUser { get; set; }
public ModelSevUser? CreateUser { get; set; }
/// <summary>
/// sevClient is the unique id every customer has and is used in nearly all operations
@@ -166,7 +166,7 @@ namespace ConsoleApp3.DataContracts
/// <value>sevClient is the unique id every customer has and is used in nearly all operations</value>
[DataMember(Name = "sevClient", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "sevClient")]
public Object SevClient { get; set; }
public Object? SevClient { get; set; }
/// <summary>
/// delivery date of the goods from the invoice, please use dd.MM.yyyy
@@ -182,7 +182,7 @@ namespace ConsoleApp3.DataContracts
/// <value>status of the invoice</value>
[DataMember(Name = "status", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "status")]
public EInvoiceStatus Status { get; set; }
public EInvoiceStatus? Status { get; set; }
/// <summary>
///
@@ -198,7 +198,7 @@ namespace ConsoleApp3.DataContracts
/// <value>SevUser who created the invoice and therefore is the contact person</value>
[DataMember(Name = "contactPerson", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "contactPerson")]
public ModelSevUser ContactPerson { get; set; } = new ModelSevUser()
public ModelSevUser? ContactPerson { get; set; } = new ModelSevUser()
{
};
@@ -217,7 +217,7 @@ namespace ConsoleApp3.DataContracts
/// <value>additional text when adding a value added tax regulation</value>
[DataMember(Name = "taxText", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "taxText")]
public string TaxText { get; set; }
public string TaxText { get; set; } = "";
/// <summary>
/// dunning level of the invoice
@@ -233,7 +233,7 @@ namespace ConsoleApp3.DataContracts
/// <value>name of the contacts address</value>
[DataMember(Name = "addressParentName", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "addressParentName")]
public string AddressParentName { get; set; }
public string AddressParentName { get; set; } = "";
/// <summary>
/// a reference to the contacts address
@@ -241,7 +241,7 @@ namespace ConsoleApp3.DataContracts
/// <value>a reference to the contacts address</value>
[DataMember(Name = "addressContactRef", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "addressContactRef")]
public ModelContactAddress AddressContactRef { get; set; }
public ModelContactAddress? AddressContactRef { get; set; }
/// <summary>
///
@@ -249,7 +249,7 @@ namespace ConsoleApp3.DataContracts
/// <value></value>
[DataMember(Name = "taxType", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "taxType")]
public string TaxType { get; set; }
public string TaxType { get; set; } = "";
/// <summary>
///
@@ -257,7 +257,7 @@ namespace ConsoleApp3.DataContracts
/// <value></value>
[DataMember(Name = "paymentMethod", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "paymentMethod")]
public ModelPaymentMethod PaymentMethod { get; set; }
public ModelPaymentMethod? PaymentMethod { get; set; }
/// <summary>
///
@@ -265,7 +265,7 @@ namespace ConsoleApp3.DataContracts
/// <value></value>
[DataMember(Name = "costCentre", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "costCentre")]
public ModelCostCentre CostCentre { get; set; }
public ModelCostCentre? CostCentre { get; set; }
/// <summary>
///
@@ -281,7 +281,7 @@ namespace ConsoleApp3.DataContracts
/// <value></value>
[DataMember(Name = "origin", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "origin")]
public Object Origin { get; set; }
public Object? Origin { get; set; }
/// <summary>
/// type of the invoice
@@ -289,7 +289,7 @@ namespace ConsoleApp3.DataContracts
/// <value>type of the invoice</value>
[DataMember(Name = "invoiceType", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "invoiceType")]
public string InvoiceType { get; set; }
public string InvoiceType { get; set; } = "";
/// <summary>
///
@@ -353,7 +353,7 @@ namespace ConsoleApp3.DataContracts
/// <value></value>
[DataMember(Name = "addressParentName2", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "addressParentName2")]
public string AddressParentName2 { get; set; }
public string AddressParentName2 { get; set; } = "";
/// <summary>
///
@@ -361,7 +361,7 @@ namespace ConsoleApp3.DataContracts
/// <value></value>
[DataMember(Name = "addressName2", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "addressName2")]
public string AddressName2 { get; set; }
public string AddressName2 { get; set; } = "";
/// <summary>
///
@@ -369,7 +369,7 @@ namespace ConsoleApp3.DataContracts
/// <value></value>
[DataMember(Name = "taxSet", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "taxSet")]
public ModelTaxSet TaxSet { get; set; }
public ModelTaxSet? TaxSet { get; set; }
/// <summary>
///
@@ -377,7 +377,7 @@ namespace ConsoleApp3.DataContracts
/// <value></value>
[DataMember(Name = "addressGender", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "addressGender")]
public string AddressGender { get; set; }
public string AddressGender { get; set; } = "";
/// <summary>
///
@@ -393,7 +393,7 @@ namespace ConsoleApp3.DataContracts
/// <value></value>
[DataMember(Name = "address", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "address")]
public string Address { get; set; }
public string Address { get; set; } = "";
/// <summary>
///
@@ -497,7 +497,7 @@ namespace ConsoleApp3.DataContracts
/// <value></value>
[DataMember(Name = "entryType", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "entryType")]
public ModelEntryType EntryType { get; set; }
public ModelEntryType? EntryType { get; set; }
/// <summary>
///
@@ -505,7 +505,7 @@ namespace ConsoleApp3.DataContracts
/// <value></value>
[DataMember(Name = "costumerInternalNote", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "costumerInternalNote")]
public string CostumerInternalNote { get; set; }
public string CostumerInternalNote { get; set; } = "";
/// <summary>
///
@@ -530,7 +530,7 @@ namespace ConsoleApp3.DataContracts
/// <value></value>
[DataMember(Name = "sendType", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "sendType")]
public string SendType { get; set; }
public string SendType { get; set; } = "";
/// <summary>
///