/// <summary> /// 单例模式====双层互锁 /// </summary> /// <returns></returns> public static TongYong_SanDian GetObject() { if (yqsd == null) { lock (obj) { if (yqsd == null) { yqsd = new TongYong_SanDian(); } } } return(yqsd); }
public SanDianAbs CreateYouXiSanDian(string brand) { switch (brand) { case "tongyongsandian": youcr1 = TongYong_SanDian.GetObject(); break; case "jiuyouzhuce": youcr1 = JiuYou_SanDian.GetObject(); break; default: break; } return(youcr1); }