Repository navigation
Simplifications around image loading, and C++ generated code cleanup. - #360
Conversation
| case ImageAsset.ImageAssetType.Embedded: | ||
| var embeddedImageAsset = (EmbeddedImageAsset)imageAsset; | ||
| surface = LoadedImageSurface.StartLoadFromStream(embeddedImageAsset.Bytes); | ||
| surface.SetName(imageAsset.Id); |
There was a problem hiding this comment.
Set a description here as well so that comments will be generated explaining what the big generated array is for. #Closed
| /// This affects the names used to reference files generated by cppwinrt.exe. | ||
| /// | ||
| public string RootNamespace { get; set; } | ||
| public string RootNamespace { get; set; } = string.Empty; |
There was a problem hiding this comment.
= string.Empty; [](start = 49, length = 16)
Stupid question: Why is it necessary to initialize it to Empty? Shouldn't users assume that a string can be null or Empty? #WontFix
There was a problem hiding this comment.
It just saves the user from having to differentiate those cases. I hit a codepath that wasn't checking for null, so rather than making the code more complex there I just set it here.
A null namespace doesn't make sense. Ideally this would be a non-nullable string. Let me see if I can get that enabled (we couldn't use nullable reference types previously because we didn't have the latest version of C#, but it might work now).
In reply to: 498460566 [](ancestors = 498460566)
There was a problem hiding this comment.
Will enable nullable reference types in a separate PR... doing it now but it changes too much stuff to be part of this PR.
In reply to: 498475365 [](ancestors = 498475365,498460566)
|
/// A |
||
| /// The name of the field to be written. | ||
| /// The bytes in the array. | ||
| protected abstract void WriteByteArrayField(CodeBuilder builder, string fieldName, byte[] bytes); |
There was a problem hiding this comment.
CodeBuilder builder, string fieldName, byte[] bytes [](start = 52, length = 51)
nit: separate lines for params #WontFix
No description provided.