/// <summary> /// Returns whether the calling Entity inherits from another Entity that implements IClickable /// </summary> /// <param name="instance">The calling Entity</param> /// <returns>Whether the implementation is found in a base Entity.</returns> public static bool GetInheritsFromIClickable(this EntitySave instance) { if (string.IsNullOrEmpty(instance.BaseEntity)) { return(false); } else { EntitySave entitySave = ObjectFinder.Self.GetEntitySave(instance.BaseEntity); return(entitySave != null && (entitySave.ImplementsIClickable || entitySave.GetInheritsFromIClickable())); } }
public static bool GetImplementsIClickableRecursively(this EntitySave instance) { return(instance.ImplementsIClickable || instance.GetInheritsFromIClickable()); }