From 0e33b240b9f26c6d89fa4d4f0d2731e4081ee70b Mon Sep 17 00:00:00 2001 From: Rose <83477269+AtariDreams@users.noreply.github.com> Date: Thu, 20 Oct 2022 12:01:31 -0400 Subject: [PATCH] Correct Guid Generator Undo any accidental changes --- src/WinRT.Runtime/GuidGenerator.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/WinRT.Runtime/GuidGenerator.cs b/src/WinRT.Runtime/GuidGenerator.cs index 128de43bf..2028abe82 100644 --- a/src/WinRT.Runtime/GuidGenerator.cs +++ b/src/WinRT.Runtime/GuidGenerator.cs @@ -22,7 +22,7 @@ public static Guid GetGUID(Type type) return type.GetGuidType().GUID; } - public static Guid GetIID( + public static Guid GetIID( #if NET [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicFields)] #endif @@ -36,21 +36,21 @@ public static Guid GetIID( return (Guid)type.GetField("PIID").GetValue(null); } - public static string GetSignature( + public static string GetSignature( #if NET [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicFields)] #endif Type type) - { + { if (type == typeof(object)) { return "cinterface(IInspectable)"; - } - + } + if (type == typeof(string)) { return "string"; - } + } var helperType = type.FindHelperType(); if (helperType != null) @@ -95,15 +95,15 @@ public static string GetSignature( } } } - + type = type.IsInterface ? (type.GetAuthoringMetadataType() ?? type) : type; if (type.IsGenericType) { var args = type.GetGenericArguments().Select(t => GetSignature(t)); return "pinterface({" + GetGUID(type) + "};" + String.Join(";", args) + ")"; - } - + } + if (type.IsDelegate()) { return "delegate({" + GetGUID(type) + "})";