Browse Source
Merge pull request #8784 from rdeago/detect-buildavaloniaapp
Detect method BuildAvaloniaApp in base class.
pull/8840/head
Nikita Tsukanov
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
6 additions and
2 deletions
-
src/Avalonia.DesignerSupport/Remote/RemoteDesignerEntryPoint.cs
|
|
|
@ -168,8 +168,12 @@ namespace Avalonia.DesignerSupport.Remote |
|
|
|
var entryPoint = asm.EntryPoint; |
|
|
|
if (entryPoint == null) |
|
|
|
throw Die($"Assembly {args.AppPath} doesn't have an entry point"); |
|
|
|
var builderMethod = entryPoint.DeclaringType.GetMethod(BuilderMethodName, |
|
|
|
BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic, null, Array.Empty<Type>(), null); |
|
|
|
var builderMethod = entryPoint.DeclaringType.GetMethod( |
|
|
|
BuilderMethodName, |
|
|
|
BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.FlattenHierarchy, |
|
|
|
null, |
|
|
|
Array.Empty<Type>(), |
|
|
|
null); |
|
|
|
if (builderMethod == null) |
|
|
|
throw Die($"{entryPoint.DeclaringType.FullName} doesn't have a method named {BuilderMethodName}"); |
|
|
|
Design.IsDesignMode = true; |
|
|
|
|