Files
tysdk-intergration/sdk-intergration/LocalPackages/PlayFabSDK/Shared/Internal/wsaReflectionExtensions.cs
tech aa5ce1ff5a [U] add PlayFab SDK and SNS login improvements
- Add PlayFabSDK as local package dependency
- Add PlayFabTool.cs for PlayFab API integration
- Implement LoginBySns method in TYSdkFacade
- Add Android SNS login support in SDKManager and UnityBridgeFunc
- Add Build Android With Debug menu option
- Improve exception handling and timeout management

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-29 16:12:17 +08:00

67 lines
2.0 KiB
C#

#if UNITY_WSA && UNITY_WP8
#define NETFX_CORE
#endif
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Text;
namespace PlayFab
{
public static class WsaReflectionExtensions
{
#if !NETFX_CORE
public static Delegate CreateDelegate(this MethodInfo methodInfo, Type delegateType, object instance)
{
return Delegate.CreateDelegate(delegateType, instance, methodInfo);
}
public static Type GetTypeInfo(this Type type)
{
return type;
}
public static Type AsType(this Type type)
{
return type;
}
public static string GetDelegateName(this Delegate delegateInstance)
{
return delegateInstance.Method.Name;
}
#else
public static bool IsInstanceOfType(this Type type, object obj)
{
return obj != null && type.GetTypeInfo().IsAssignableFrom(obj.GetType().GetTypeInfo());
}
public static string GetDelegateName(this Delegate delegateInstance)
{
return delegateInstance.ToString();
}
public static MethodInfo GetMethod(this Type type, string methodName)
{
return type.GetTypeInfo().GetDeclaredMethod(methodName);
}
public static IEnumerable<FieldInfo> GetFields(this TypeInfo typeInfo)
{
return typeInfo.DeclaredFields;
}
public static TypeInfo GetTypeInfo(this TypeInfo typeInfo)
{
return typeInfo;
}
public static IEnumerable<ConstructorInfo> GetConstructors(this TypeInfo typeInfo)
{
return typeInfo.DeclaredConstructors;
}
public static IEnumerable<MethodInfo> GetMethods(this TypeInfo typeInfo, BindingFlags ignored)
{
return typeInfo.DeclaredMethods;
}
public static IEnumerable<TypeInfo> GetTypes(this Assembly assembly)
{
return assembly.DefinedTypes;
}
#endif
}
}