这是PetShop 4.0 PetShopProfileProvider.cs里面的一段代码
public override void Initialize(string name, NameValueCollection config) { if(config == null)
throw new ArgumentNullException("config");
if(string.IsNullOrEmpty(config["description"])) {
config.Remove("description");
config.Add("description", "Pet Shop Custom Profile Provider");
} if(string.IsNullOrEmpty(name))
name = "PetShopProfileProvider";
if(config["applicationName"] != null && !string.IsNullOrEmpty(config["applicationName"].Trim()))
applicationName = config["applicationName"]; base.Initialize(name, config); }我想问我在登录时: public override void Initialize(string name, NameValueCollection config) 这句当中的:name和config是那里传过来的呀。为什么name的值是ShoppingCartProvider还有NameValueCollection这个类干嘛用的,谢谢了
public override void Initialize(string name, NameValueCollection config) { if(config == null)
throw new ArgumentNullException("config");
if(string.IsNullOrEmpty(config["description"])) {
config.Remove("description");
config.Add("description", "Pet Shop Custom Profile Provider");
} if(string.IsNullOrEmpty(name))
name = "PetShopProfileProvider";
if(config["applicationName"] != null && !string.IsNullOrEmpty(config["applicationName"].Trim()))
applicationName = config["applicationName"]; base.Initialize(name, config); }我想问我在登录时: public override void Initialize(string name, NameValueCollection config) 这句当中的:name和config是那里传过来的呀。为什么name的值是ShoppingCartProvider还有NameValueCollection这个类干嘛用的,谢谢了
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货