1
構造器,我必須在屏幕上1和2參數在autofac
builder.RegisterInstance(dataGridView1)
builder.RegisterInstance(dataGridView2)
builder.RegisterType<GeneralHtmlNotifier>().As<INotifier>();
GridView的我怎麼知道在課堂上,我說我要叫datagridview1而不是datagridview2如果註冊一個實例的構造
public GeneralHtmlNotifier(DataGridView dataGridView1, IEnumerable<IChecker> checkers)
{
_clsDataGridView = dataGridView1;
_checkers = checkers;
}
好.....標題部分與「autofac」相當有趣! – FeliceM