private void AnalyzeAssembly(Assembly assembly) { if (assembly.ReflectionOnly) { return; } IEnumerable <Type> nodeTypes = Enumerable.Empty <Type>(); nodeTypes = assembly.GetTypes(); nodeTypes = nodeTypes.Where(t => !t.IsAbstract && t.IsSubclassOf(typeof(Node)) && t != typeof(Flow) && !t.IsSubclassOf(typeof(Flow))) .Where(t => t.GetConstructor(Type.EmptyTypes) != null); foreach (Type type in nodeTypes) { NodeTypeInfo nodeType = NodeTypeInfo.From(type); NodeCategoryInfo nodeCategory = NodeCategories.FirstOrDefault(c => c.Category == nodeType.Category); if (nodeCategory == null) { NodeCategories.Add(nodeCategory = new NodeCategoryInfo(nodeType.Category)); } nodeCategory.Nodes.Add(nodeType); } }
private void AnalyzeAssembly(Assembly assembly) { if (assembly.ReflectionOnly) return; IEnumerable<Type> nodeTypes = Enumerable.Empty<Type>(); nodeTypes = assembly.GetTypes(); nodeTypes = nodeTypes.Where(t => !t.IsAbstract && t.IsSubclassOf(typeof(Node)) && t != typeof(Flow) && !t.IsSubclassOf(typeof(Flow))) .Where(t => t.GetConstructor(Type.EmptyTypes) != null); foreach (Type type in nodeTypes) { NodeTypeInfo nodeType = NodeTypeInfo.From(type); NodeCategoryInfo nodeCategory = NodeCategories.FirstOrDefault(c => c.Category == nodeType.Category); if (nodeCategory == null) NodeCategories.Add(nodeCategory = new NodeCategoryInfo(nodeType.Category)); nodeCategory.Nodes.Add(nodeType); } }