Properly marshall diagnostic codes to the managed layer
Merge pull request #847 from Microsoft/marshallDiagnosticsCode

Properly marshall diagnostic codes to the managed layer