Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authoring support for C# built-in types to WinRT types #631

Merged
merged 9 commits into from
Dec 17, 2020

Conversation

manodasanW
Copy link
Member

@manodasanW manodasanW commented Dec 9, 2020

  • Authoring support for mapping C# built-in types to WinRT types (both as part of type reference in param / return type, but also for implementing them)
  • Added support for generics
  • Added support for arrays
  • Various bug fixes
  • Addded an authoring impl class for authored structs / enums which don't need a wrapper to hold onto attribute information which is used as part of the WinRT type check
  • Added support for out parameters
  • Added tests to exercise these scenarios

Contributes to #309

@manodasanW
Copy link
Member Author

You probably should disable whitespace diff when reviewing this PR.

</ItemGroup>

</Project>
<Project Sdk="Microsoft.NET.Sdk">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be moved to the Samples folder?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I probably want to rename this to be a test, this component is more for test purposes than to serve as a sample. I will address that in a future PR.

@Scottj1s
Copy link
Member

    private static readonly Dictionary<string, MappedType> MappedCSharpTypes = new Dictionary<string, MappedType>()

Ideally, the 3 sources of mapping data would derived from a single source. Meantime, can we add comments to all 3 to indicate the other two need to be kept in sync?

inline const std::initializer_list<mapped_type> get_mapped_types_in_namespace(std::string_view typeNamespace)

static Projections()


Refers to: src/Authoring/WinRT.SourceGenerator/WinRTTypeWriter.cs:271 in e3f6fd1. [](commit_id = e3f6fd1, deletion_comment = False)

Copy link
Member

@Scottj1s Scottj1s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

exciting!

@manodasanW manodasanW merged commit 69e9264 into master Dec 17, 2020
@manodasanW manodasanW deleted the manodasanw/customtypemapping branch December 17, 2020 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants