Skip to content

Commit

Permalink
Add tests to se that codegen works with nullable reference types (#470)
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel-Svensson authored Dec 20, 2023
1 parent 27c1999 commit c259c78
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,13 @@ public City() {
public string CountyName { get; set; }
public string StateName { get; set; }
public County County {get;set;}
#if NET
#nullable enable
public string? ZoneName { get; set; }
#nullable restore
#else
public string ZoneName { get; set; }
#endif
public string CalculatedCounty { get { return this.CountyName; } set { } }
public int ZoneID { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -541,10 +541,16 @@ public static class OrderDetailMetadata
public partial class Product
{
private string _resolveMethod = String.Empty;

// Additional data member to enable resolve logic to differ based on the test scenario string being passed in
[DataMember]
#if NET
#nullable enable
public string? ResolveMethod
#nullable restore
#else
public string ResolveMethod
#endif
{
get
{
Expand Down

0 comments on commit c259c78

Please sign in to comment.