示例#1
0
        internal void VerifyWinRTGenericInterfaceGuids()
        {
#if !CORECLR && ENABLE_WINRT
            // Check dynamic guid generation generates same guid as mcg generated one
            if (m_interfaceData != null)
            {
                foreach (McgInterfaceData item in m_interfaceData)
                {
                    RuntimeTypeHandle typeHnd = item.ItfType;
                    if (!typeHnd.IsInvalid())
                    {
                        if (typeHnd.IsGenericType())
                        {
                            Guid expectedGuid = item.ItfGuid;
                            Guid actualGuid   = DynamicInteropGuidHelpers.GetGuid_NoThrow(typeHnd);
                            if (!expectedGuid.Equals(actualGuid))
                            {
                                Environment.FailFast("Guid mismatch:" + "  expected:" + expectedGuid + "  actual:" + actualGuid);
                            }
                        }
                    }
                }
            }
#endif
        }