Ejemplo n.º 1
0
        public DllImportDialog(IComponentBuilder <IComponent, ComponentTypeInfo> generalizedComponentBuilderToUpdate)
        {
            InitializeComponent();
            //
            Type componentBuilderType = generalizedComponentBuilderToUpdate.GetType();

            if (componentBuilderType.Name == "BuilderGeneralizer")
            {
                componentBuilderType = generalizedComponentBuilderToUpdate.GetCastedBuilder().GetType();
            }
            try
            {
                Type[] componentBuilderInterfaces = componentBuilderType.GetInterfaces();
                Type[] genArgs = componentBuilderInterfaces[0].GetGenericArguments();
                this.Text = $"Import {genArgs[0].Name}-based Types";
            }
            catch (Exception) // TEMPORARY
            {
            }
            //
            BeingUpdatedComponentBuilder = generalizedComponentBuilderToUpdate;
        }