Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix crash when event does not haveAdd method and improve message for some other internal errors#2409

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
filmor merged 3 commits intopythonnet:masterfromlosttech:InternalError
Jul 2, 2024
Merged
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
NextNext commit
not all events have Add method
fixes#2405
  • Loading branch information
@lostmsu
lostmsu committedJul 1, 2024
commit790b7c843d4dc12365f52afffe93a9f795c0942a
4 changes: 3 additions & 1 deletionsrc/runtime/ClassManager.cs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -290,11 +290,13 @@ internal static void InitClassBase(Type type, ClassBase impl, ReflectedClrType p

internal static bool ShouldBindMethod(MethodBase mb)
{
if (mb is null) throw new ArgumentNullException(nameof(mb));
return (mb.IsPublic || mb.IsFamily || mb.IsFamilyOrAssembly);
}

internal static bool ShouldBindField(FieldInfo fi)
{
if (fi is null) throw new ArgumentNullException(nameof(fi));
return (fi.IsPublic || fi.IsFamily || fi.IsFamilyOrAssembly);
}

Expand DownExpand Up@@ -326,7 +328,7 @@ internal static bool ShouldBindProperty(PropertyInfo pi)

internal static bool ShouldBindEvent(EventInfo ei)
{
returnShouldBindMethod(ei.GetAddMethod(true));
return ei.GetAddMethod(true) is { } add && ShouldBindMethod(add);
}

private static ClassInfo GetClassInfo(Type type, ClassBase impl)
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp