File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -24,20 +24,20 @@ coded_index<TypeDefOrRef> FindGuidType()
2424 {
2525 // There is no definitive TypeDef for System.Guid. But there are a variety of TypeRefs scattered about
2626 // This one should be relatively quick to find
27- auto pv = db_cache->find (" Windows.Foundation" , " PropertyValue " );
27+ auto pv = db_cache->find (" Windows.Foundation" , " IPropertyValue " );
2828 for (auto && method : pv.MethodList ())
2929 {
30- if (method.Name () == " CreateGuid " )
30+ if (method.Name () == " GetGuid " )
3131 {
3232 auto const & sig = method.Signature ();
33- auto const & params = sig.Params ();
34- if (params.first != params.second )
33+ auto const & type = sig.ReturnType ().Type ().Type ();
34+ XLANG_ASSERT (std::holds_alternative<coded_index<TypeDefOrRef>>(type));
35+ if (std::holds_alternative<coded_index<TypeDefOrRef>>(type))
3536 {
36- auto const & type = params.first ->Type ().Type ();
37- if (std::holds_alternative<coded_index<TypeDefOrRef>>(type))
38- {
39- guid_TypeRef = std::get<coded_index<TypeDefOrRef>>(type);
40- }
37+ guid_TypeRef = std::get<coded_index<TypeDefOrRef>>(type);
38+ XLANG_ASSERT (guid_TypeRef.type () == TypeDefOrRef::TypeRef);
39+ XLANG_ASSERT (guid_TypeRef.TypeRef ().TypeNamespace () == " System" );
40+ XLANG_ASSERT (guid_TypeRef.TypeRef ().TypeName () == " Guid" );
4141 }
4242 }
4343 }
You can’t perform that action at this time.
0 commit comments