public void GetSymhandleByNameAsync()
        {
            var amsTestSocket = new AmsSocketTest();
            amsTestSocket.SendMessage = new byte[] {
                    0,0,58,0,0,0,5,1,204,123,1,1,33,3,10,0,0,120,
                    1,1,137,128,9,0,4,0,26,0,0,0,0,0,0,0,1,0,0,0,
                    3,240,0,0,0,0,0,0,4,0,0,0,10,0,0,0,46,84,69,83,
                    84,84,73,77,69,0};

            amsTestSocket.ReceiveMessage = new byte[] { 
                    0,0,44,0,0,0,10,0,0,120,1,1,137,128,5,1,204,123,
                    1,1,33,3,9,0,5,0,12,0,0,0,0,0,0,0,1,0,0,0,0,0,0,
                    0,4,0,0,0,141,2,0,164};

            using (AdsClient client = new AdsClient(
                    amsNetIdSource: "10.0.0.120.1.1",
                    amsSocket: amsTestSocket,
                    amsNetIdTarget: "5.1.204.123.1.1"))
            {
                var task = client.GetSymhandleByNameAsync(".TESTTIME");
                task.Wait(5000);
                var handle = task.Result;
                Assert.AreEqual(handle, 2751464077);
            }
        }
        public void GetSymhandleByNameAsync()
        {
            var amsTestSocket = new AmsSocketTest();

            amsTestSocket.SendMessage = new byte[] {
                0, 0, 58, 0, 0, 0, 5, 1, 204, 123, 1, 1, 33, 3, 10, 0, 0, 120,
                1, 1, 137, 128, 9, 0, 4, 0, 26, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
                3, 240, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 10, 0, 0, 0, 46, 84, 69, 83,
                84, 84, 73, 77, 69, 0
            };

            amsTestSocket.ReceiveMessage = new byte[] {
                0, 0, 44, 0, 0, 0, 10, 0, 0, 120, 1, 1, 137, 128, 5, 1, 204, 123,
                1, 1, 33, 3, 9, 0, 5, 0, 12, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
                0, 4, 0, 0, 0, 141, 2, 0, 164
            };

            using (AdsClient client = new AdsClient(
                       amsNetIdSource: "10.0.0.120.1.1",
                       amsSocket: amsTestSocket,
                       amsNetIdTarget: "5.1.204.123.1.1"))
            {
                var task = client.GetSymhandleByNameAsync(".TESTTIME");
                task.Wait(5000);
                var handle = task.Result;
                Assert.AreEqual(handle, 2751464077);
            }
        }