-
Notifications
You must be signed in to change notification settings - Fork 263
dotnet: support optional arguments in methods and constructors #210
Copy link
Copy link
Closed
Labels
effort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortlanguage/dotnetRelated to .NET bindings (C#, F#, ...)Related to .NET bindings (C#, F#, ...)p0
Description
jsii methods/constructors can have optional arguments. The .NET generator should respect those and pass null in calls that don't supply them.
-- from @mpiroc:
jsii-dotnet-generator should supply default values for arguments with optional types
jsii-dotnet-generator ensures that null is a valid value for types marked optional in JSII. For value types, this means making them nullable, i.e. int?. For reference types, null is already a valid value.
When a type like this is used in a parameter list, jsii-dotnet-generator should create a default value of null for the parameter. Currently, the user has to explicitly pass null.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
effort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortlanguage/dotnetRelated to .NET bindings (C#, F#, ...)Related to .NET bindings (C#, F#, ...)p0