码迷,mamicode.com
首页 > 其他好文 > 详细

[Autofac] 给Resolve传参

时间:2016-01-05 18:33:40      阅读:126      评论:0      收藏:0      [点我收藏+]

标签:

 1 //传参
 2 var frm = Container.Resolve<SettlementCheckTradeEditFrm>(new NamedParameter("settlement", Settlement));
 3 frm.ShowDialog();
 4 Settlement.UserTrade.UserID = frm.UserID;
 5 
 6 //SettlementCheckTradeEditFrm增加新的构造函数
 7 public SettlementCheckTradeEditFrm(SettlementCheckTradeData settlement)
 8 {
 9     AccID = settlement.AccTrade.AccountID;
10     TradeID = settlement.AccTrade.TradeID;
11     InitializeComponent();
12 }

 

[Autofac] 给Resolve传参

标签:

原文地址:http://www.cnblogs.com/panpan-v1/p/5103275.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!