Subject: New "index" properties must default to -1
At TC #27 we approved Issue #256, “Make Run.Files an array”. This change added or modified several “index” properties, such as result.ruleIndex (an index into the run.resources.rules array), file.parentIndex (an index into the run.files array), and location.logicalLocationIndex (an index into the run.logicalLocations array).
Since 0 is a valid value for these properties, we can’t let them default to 0 if they are absent. So I’m going to specify that they default to -1. This language was not in the change draft.
If the .NET SDK supported Nullable properties, we could allow the default to be null, but it doesn’t. We’ve run into this issue before, and have always decided to make life easy for the SDK by using -1 (an invalid value) as the default.
If anybody wants to discuss this at TC #28, please let me know and I’ll add it to the agenda. Otherwise, I will make this change at editorial discretion.