Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not throw ArgumenNullException in ConfigSettingEntry.GetAcceptedValues #89

Merged
merged 3 commits into from
Apr 5, 2024

Conversation

MrAgeo
Copy link
Contributor

@MrAgeo MrAgeo commented Apr 5, 2024

This PR removes the ArgumenNullException present in ConfigSettingEntry.GetAcceptedValues(AcceptableValueBase values), enforcing the use of both MinValue and MaxValue for custom range classes (see issue's comments for a in-depth explanation)

- Added `supportedTypes` Type array (containing the types of `AcceptableValueList` & `AcceptableValueRange`).

- Added method `isTypeSupported` to check if a type is a subclass or an instance of a type in `supportedTypes` via `IsSubclassOfRawGeneric`.

- Added `IsSubclassOfRawGeneric(Type generic, Type toCheck)` method which checks if `toCheck` is a subclass or an instance of `generic`.
…ue` fields for a custom range class

See issue's comments for a in-depth explanation
@ManlyMarco ManlyMarco changed the title Fix for issue #88 Do not throw ArgumenNullException in ConfigSettingEntry.GetAcceptedValues Apr 5, 2024
@ManlyMarco ManlyMarco merged commit 19cff15 into BepInEx:master Apr 5, 2024
@MrAgeo MrAgeo deleted the fix-for-issue88 branch April 5, 2024 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants