WinRT Projected types documentation

WinRT has something called predictable types . For example, metadata IXamlType.UnderlyingTypeis defined as:

TypeName UnderlyingType { get; }

However, when used in a C # application, it changes as follows:

Type UnderlyingType { get; }

My question is: is there any documentation regarding the rules, APIs, attributes used for such mappings?

+5
source share
4 answers

, , CLR, WinRT CLR. , , -. , CLR. ( ) (: Word.docx)

+2

Windows (MIDL /winrt MDMERGE), , typedef, typedef typerefs, .

CLR winmd, Windows CLR. Windows.Foundation.Uri, System.Uri #. CLR , W.F.Uri S.Uri, .

, , , - , CLR.

+2
+1

, - . . spelunking .NET.

.NET .

, . , , WinMD adapter. :

// This metadata importer is exposed publically via CoCreateInstance(CLSID_CorMetaDataDispenser...).
// when the target is a .winmd file. It applies a small number of on-the-fly
// conversions to make the .winmd file look like a regular .NET assembly.

, CoCreateInstance(CLSID_CorMetaDataDispenser...) IMetaDataDispenser, OpenScope() IID_IMetaDataImport .winmd, . , IMap - IDictionary, . , , Visual Studio .

You can also include a header with a macro iterator in your own C / C ++ project and convert the data in it to any form that is most useful to you, for example. generate code from it.

0
source

All Articles