コード例 #1
0
        public void CreateAndDisposeClient()
        {
            CustomClient newClient = _factory.CreateClient(_clientSocket, _serverMock.Object);

            Assert.NotNull(newClient);
            Assert.NotNull(newClient.Socket);
            newClient.Dispose();
            Assert.Null(newClient.Socket);
        }
コード例 #2
0
        public void Dispose()
        {
            _packet.Dispose();
            _customClient.Dispose();
            _otherClient.Dispose();

            foreach (IDisposable disposableObject in _customClientsList)
            {
                disposableObject.Dispose();
            }
        }