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

@@ -28,7 +28,7 @@ namespace ConsoleApp3.DataContracts
/// <value>the contact the address belongs to</value>
[DataMember(Name = "contact", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "contact")]
public ModelContact Contact { get; set; }
public ModelContact? Contact { get; set; }
/// <summary>
///
@@ -36,7 +36,7 @@ namespace ConsoleApp3.DataContracts
/// <value></value>
[DataMember(Name = "street", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "street")]
public string Street { get; set; }
public string Street { get; set; } = "";
/// <summary>
/// zip of the city/village
@@ -44,7 +44,7 @@ namespace ConsoleApp3.DataContracts
/// <value>zip of the city/village</value>
[DataMember(Name = "zip", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "zip")]
public string Zip { get; set; }
public string Zip { get; set; } = "";
/// <summary>
///
@@ -52,7 +52,7 @@ namespace ConsoleApp3.DataContracts
/// <value></value>
[DataMember(Name = "city", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "city")]
public string City { get; set; }
public string City { get; set; } = "";
/// <summary>
///
@@ -60,7 +60,7 @@ namespace ConsoleApp3.DataContracts
/// <value></value>
[DataMember(Name = "country", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "country")]
public ModelStaticCountry Country { get; set; }
public ModelStaticCountry? Country { get; set; }
/// <summary>
/// category of the address
@@ -68,7 +68,7 @@ namespace ConsoleApp3.DataContracts
/// <value>category of the address</value>
[DataMember(Name = "category", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "category")]
public ModelCategory Category { get; set; }
public ModelCategory? Category { get; set; }
/// <summary>
///
@@ -76,7 +76,7 @@ namespace ConsoleApp3.DataContracts
/// <value></value>
[DataMember(Name = "name", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "name")]
public string Name { get; set; }
public string Name { get; set; } = "";
/// <summary>
/// sevClient is the unique id every customer has and is used in nearly all operations
@@ -84,7 +84,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; } = new object();
/// <summary>
///
@@ -92,7 +92,7 @@ namespace ConsoleApp3.DataContracts
/// <value></value>
[DataMember(Name = "name2", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "name2")]
public string Name2 { get; set; }
public string Name2 { get; set; } = "";
/// <summary>
///
@@ -100,7 +100,7 @@ namespace ConsoleApp3.DataContracts
/// <value></value>
[DataMember(Name = "name3", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "name3")]
public string Name3 { get; set; }
public string Name3 { get; set; } = "";
/// <summary>
///
@@ -108,7 +108,7 @@ namespace ConsoleApp3.DataContracts
/// <value></value>
[DataMember(Name = "name4", EmitDefaultValue = false)]
[JsonProperty(PropertyName = "name4")]
public string Name4 { get; set; }
public string Name4 { get; set; } = "";
}
}