예제 #1
0
        public static NodeManifest Construct(Type[] types)
        {
            var manifest = new NodeManifest();

            var information = new Dictionary <string, NodeInformation>();

            foreach (var type in types)
            {
                information.Add(type.FullName, NodeInformation.ConstructNodeInformation(type));
            }
            manifest.Nodes = information;
            return(manifest);
        }
예제 #2
0
        public static NodeManifest Construct()
        {
            var manifest = new NodeManifest();

            var information = new Dictionary <string, NodeInformation>();

            foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies())
            {
                foreach (var type in assembly.GetTypes())
                {
                    if (type.IsAbstract)
                    {
                        continue;
                    }

                    if (typeof(NodeTemplate).IsAssignableFrom(type))
                    {
                        information.Add(type.FullName, NodeInformation.ConstructNodeInformation(type));
                    }
                }
            }
            manifest.Nodes = information;
            return(manifest);
        }