schangxiang@126.com
2025-09-23 1ec17ce75f4e4324e9756a91c74f3f52928c9351
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
 
using VirtualSrm.OpcWcfService;
namespace VirtualSrm.Cache.Entity
{
    public class CacheEntity
    {
 
        private static object OpcWcfServiceLock = new object();
 
        private static OpcWcfServiceClient opcWcfServiceClient = null;
 
        public static OpcWcfServiceClient OpcWcfServiceClient
        {
            get
            {
                if (opcWcfServiceClient == null)
                {
                    lock (OpcWcfServiceLock)
                    {
                        if (opcWcfServiceClient == null)
                        {
                            opcWcfServiceClient = new OpcWcfServiceClient();
                        }
                    }
                }
                return CacheEntity.opcWcfServiceClient;
            }
            set { CacheEntity.opcWcfServiceClient = value; }
        }
 
    }
}