Exemplo n.º 1
0
        /// <summary>
        /// Reads avaliable elements at start
        /// </summary>
        private void ReadAvailableElements()
        {
            ClassReader         reader = new ClassReader(null, IsTypeToolboxVisible);
            var                 types  = reader.GetTypes();
            ClassAssemblyReader classAssemblyReader = new ClassAssemblyReader(Settings.Default.Assemblies);

            types.AddRange(classAssemblyReader.GetTypes(IsTypeToolboxVisible));
            foreach (Type type in types)
            {
                ElementCreatorViewModel model = new ElementCreatorViewModel(type);
                ActivityMapperAttribute activityMapperAttribute = type.GetCustomAttribute <ActivityMapperAttribute>();
                activityMapperAttribute?.Register();
                Elements.Add(model);
            }
        }