public void LoadAssemblies(bool refreshcache)
        {
            DataSet assemblyInfo = DynProvider.GetAssemblyInfo();

            DynProvider.MergeGAC(assemblyInfo, refreshcache, this.progress);
            if (refreshcache)
            {
                foreach (DataRow row in assemblyInfo.Tables[0].Select("IsGAC = 0"))
                {
                    DynProvider.MergeLocal(assemblyInfo, row["Path"].ToString(), this.progress);
                }
            }
            this.progress.Message = string.Empty;
            this.progress.Notify();
            DataView view = new DataView(assemblyInfo.Tables[0]);

            view.RowFilter = "HasProvider = 1";
            this.assemblyDataGridView.AutoGenerateColumns = false;
            this.assemblyDataGridView.DataSource          = view;
            DataGridViewCheckBoxColumn dataGridViewColumn = new DataGridViewCheckBoxColumn();

            dataGridViewColumn.DataPropertyName = "Load";
            dataGridViewColumn.HeaderText       = "Load";
            DataGridViewTextBoxColumn column2 = new DataGridViewTextBoxColumn();

            column2.DataPropertyName = "Name";
            column2.HeaderText       = "Name";
            column2.AutoSizeMode     = DataGridViewAutoSizeColumnMode.Fill;
            column2.ReadOnly         = false;
            this.assemblyDataGridView.AdvancedCellBorderStyle.All = DataGridViewAdvancedCellBorderStyle.None;
            this.assemblyDataGridView.Columns.Clear();
            this.assemblyDataGridView.Columns.Add(dataGridViewColumn);
            this.assemblyDataGridView.Columns.Add(column2);
            this.assemblyDataGridView.AllowUserToResizeRows = false;
        }
示例#2
0
 private void LoadCodeDomAssemblies()
 {
     foreach (DataRow row in DynProvider.GetAssemblyInfo().Tables[0].Rows)
     {
         bool flag = (bool)row["Load"];
         if (((bool)row["HasProvider"]) && flag)
         {
             string path = (string)row["Path"];
             if ((bool)row["IsGAC"])
             {
                 Assembly.LoadWithPartialName(Path.GetFileNameWithoutExtension(path));
             }
             else
             {
                 Assembly.LoadFile(path);
             }
         }
     }
 }