Files
SteamTools/SteamTool.Steam4NET/CallbackIdentities.cs
T
2020-12-15 22:11:03 +08:00

20 lines
548 B
C#

using System;
using System.Collections.Generic;
using System.Text;
namespace Steam4NET
{
class CallbackIdentities
{
public static int GetCallbackIdentity(Type callbackStruct)
{
foreach (InteropHelp.CallbackIdentityAttribute attribute in callbackStruct.GetCustomAttributes(typeof(InteropHelp.CallbackIdentityAttribute), false))
{
return attribute.Identity;
}
throw new Exception("Callback number not found for struct " + callbackStruct);
}
}
}