Skip to content
This repository was archived by the owner on Nov 13, 2026. It is now read-only.

Add support for ExplicitScopeAttribute to metadata generation - #1321

Merged
davidwrighton merged 4 commits into
dotnet:masterfrom
davidwrighton:support_explicit_scope
May 25, 2016
Merged

davidwrighton merged 4 commits into
dotnet:masterfrom
davidwrighton:support_explicit_scope

Conversation

@davidwrighton

Copy link
Copy Markdown
Member
  • Add new IMetadataPolicy member to control the defining module of a type
  • Added mixin implementation that works for ExplicitScopeAttribute
  • Added WinRT explicit scope defined types in both the primary metadata assembly and same metadata assembly
  • Added single file and multi file tests to ensure that both definition and reference to these relocated types is correct

- Add new IMetadataPolicy member to control the defining module of a type
- Added mixin implementation that works for ExplicitScopeAttribute
- Added WinRT explicit scope defined types in both the primary metadata assembly and same metadata assembly
- Added single file and multi file tests to ensure that both definition and reference to these relocated types is correct
}
}

private class ExplicitScopeAssemblyDesc : Cts.ModuleDesc, Cts.IAssemblyDesc

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nit: We only add the Desc suffix to the base type (so, Module_Desc_ and Type_Desc_, but Ecma_Module_ and Ecma_Type_)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Ok, fixed.


public ModuleDesc GetModuleOfType(MetadataType typeDef)
{
if (_explicitScopePolicyMixin == null)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Making this thread safe would be nice future proofing.

@MichalStrehovsky

Copy link
Copy Markdown
Member

LGTM. Thanks!

@davidwrighton
davidwrighton merged commit ba30ad4 into dotnet:master May 25, 2016
@davidwrighton
davidwrighton deleted the support_explicit_scope branch May 10, 2017 22:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants