Skip to content

Commit

Permalink
Correct Guid Generator
Browse files Browse the repository at this point in the history
Undo any accidental changes
  • Loading branch information
AZero13 committed Oct 22, 2022
1 parent 2c230bc commit 0e33b24
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/WinRT.Runtime/GuidGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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) + "})";
Expand Down

0 comments on commit 0e33b24

Please sign in to comment.