anthonyreilly / NetCoreForce

Salesforce REST API toolkit for .NET Standard and .NET Core
MIT License
110 stars 63 forks source link

Modelgenerator: accomodate null reference types #41

Open anthonyreilly opened 2 years ago

anthonyreilly commented 2 years ago

Model generator can generate properties that will trigger this compiler error:

Models/SfUser.cs(106,17): warning CS8618: Non-nullable property 'Title' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.

add an option to the generator to align with the expected syntax/configs as outlined here: https://docs.microsoft.com/en-us/dotnet/csharp/nullable-references#nullable-contexts

for instance, set strings to nullable like Title?