-
Notifications
You must be signed in to change notification settings - Fork 667
Node markdown generator tool #11725
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
Node markdown generator tool #11725
Changes from all commits
f9093e4
354e682
3dd5ad4
05f5984
d7fab57
f3c2bd0
bf971d0
e5ea6c2
70bf7c3
67353b4
999a0b5
f8c13eb
7548c79
97d29e4
7599dfb
f1f5df5
a7b1542
cc9705e
3cc3667
e372af6
62009d5
b3443ed
f9a5627
6772242
6328716
e2e3789
9590d1a
dbe0a36
87fc191
2742147
f72a3ef
6c2d726
1383b06
8002f35
a427e28
4a10ed3
26b00dd
aa38bcd
bd8112a
a7bd10c
b65a2fd
a0c1eb2
5559e8b
1138c92
d9b74e1
259f870
2b24e18
18aa5b9
2cec9a2
0131c59
c0c0632
c76af1c
35ef80d
b2929ff
2a223fb
9d88dd2
15cb6e6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -230,6 +230,39 @@ internal static IEnumerable<Type> GetCustomizationTypesUsingReflection(Assembly | |
| return output; | ||
| } | ||
|
|
||
| internal static bool ContainsNodeModelSubTypeReflectionLoaded(Assembly assem, Type nodeModelType = null) | ||
| { | ||
| if(nodeModelType is null) | ||
| return assem.GetTypes().Any(x => IsNodeSubType(x)); | ||
|
|
||
| return assem.GetTypes().Any(x => IsNodeSubTypeReflectionLoaded(x, nodeModelType)); | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Similar to IsNodeSubType this will determine if a Type is a node. | ||
| /// This implementation is meant to be used when scanning types in ReflectionContext. | ||
| /// </summary> | ||
| /// <param name="t">Type to check</param> | ||
| /// <param name="nodeModelType">Type of NodeModel, this is needed to be sure we are comparing the same NodeModel type reference</param> | ||
| /// <returns></returns> | ||
| internal static bool IsNodeSubTypeReflectionLoaded(Type t, Type nodeModelType) | ||
mjkkirschner marked this conversation as resolved.
Show resolved
Hide resolved
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What does the name of this method mean? Can we rename it to have a simpler meaning?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If this method is truly necessary, looks like there could be room to get rid of some code duplication between this and the |
||
| { | ||
| bool isNodeSubType = false; | ||
| try | ||
| { | ||
| isNodeSubType = !t.IsAbstract && | ||
| t.IsSubclassOf(nodeModelType) && | ||
| t.GetConstructor(Type.EmptyTypes) != null; | ||
| } | ||
| catch(Exception e) | ||
| { | ||
| Console.WriteLine(e.Message); | ||
| Console.WriteLine(e.StackTrace); | ||
| } | ||
|
|
||
| return isNodeSubType; | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Enumerate the types in an assembly and add them to DynamoController's | ||
| /// dictionaries and the search view model. Internally catches exceptions and sends the error | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.