using iWareSAP.CLIENT.Entity; namespace iWareSAP.Cache.Entity { public class CacheEntity { private static object _sapncoClientLock = new object(); private static SapncoClient sapncoClient = null; public static SapncoClient SapncoClient { get { if (sapncoClient == null) { lock (_sapncoClientLock) { if (sapncoClient == null) { sapncoClient = new SapncoClient(); } } } return CacheEntity.sapncoClient; } } /// /// SAP服务 /// private static object _wmsWcfServiceClientLock = new object(); private static WmsWcfService.IsapWcfClient wmsWcfServiceClient = null; public static WmsWcfService.IsapWcfClient WmsWcfServiceClient { get { if (wmsWcfServiceClient == null) { lock (_wmsWcfServiceClientLock) { if (wmsWcfServiceClient == null) { wmsWcfServiceClient = new WmsWcfService.IsapWcfClient(); } } } return CacheEntity.wmsWcfServiceClient; } } } }