コード例 #1
0
 public static WCFService GetInstnace(string location)
 {
     if (_instance == null)
     {
         lock (syncObject)
         {
             _instance = new WCFService(location);
         }
     }
     return(_instance);
 }
コード例 #2
0
 /// <summary>
 /// 获取单一实例
 /// </summary>
 /// <returns></returns>
 public static WCFService GetInstance()
 {
     if (null == _instance)
     {
         _instance = new WCFService();
         return(_instance);
     }
     else
     {
         return(_instance);
     }
 }