Merge remote-tracking branch 'origin/master' into dotnet7
This commit is contained in:
@@ -127,6 +127,15 @@ bool MClass::IsSubClassOf(const MonoClass* monoClass) const
|
||||
}
|
||||
#endif
|
||||
|
||||
bool MClass::HasInterface(const MClass* klass) const
|
||||
{
|
||||
#if USE_MONO
|
||||
return klass && mono_class_is_assignable_from(klass->GetNative(), _monoClass) != 0;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool MClass::IsInstanceOfType(MObject* object) const
|
||||
{
|
||||
if (object == nullptr)
|
||||
|
||||
@@ -154,6 +154,13 @@ public:
|
||||
bool IsSubClassOf(const MonoClass* monoClass) const;
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Checks if this class implements the specified interface (including any base types).
|
||||
/// </summary>
|
||||
/// <param name="klass">The interface class.</param>
|
||||
/// <returns>True if this class implements the specified interface.</returns>
|
||||
bool HasInterface(const MClass* klass) const;
|
||||
|
||||
/// <summary>
|
||||
/// Checks is the provided object instance of this class' type.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user