?? order.cs
字號(hào):
using System;
using System.EnterpriseServices;
using System.Reflection;
using System.Configuration;
namespace BookShop.DALFactory {
/// <summary>
/// Factory implementaion for the Order DAL object
/// </summary>
public class Order {
//public static BookShop.IDAL.IOrder GetOrder() {
public static BookShop.IDAL.IOrder Create() {
/// Look up the DAL implementation we should be using
string path = System.Configuration.ConfigurationSettings.AppSettings["OrdersDAL"];
string className = path + ".Order";
// Using the evidence given in the config file load the appropriate assembly and class
return (BookShop.IDAL.IOrder)Assembly.Load(path).CreateInstance(className);
}
}
}
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -