Exemplo n.º 1
0
        private bool disposedValue = false; // 重複する呼び出しを検出するには

        protected virtual void Dispose(bool disposing)
        {
            if (!disposedValue)
            {
                if (disposing)
                {
                    if (httpClient != null && leaveDispose)
                    {
                        httpClient.Dispose();
                        httpClient = null;
                    }
                }

                disposedValue = true;
            }
        }
Exemplo n.º 2
0
        private bool disposedValue; // 重複する呼び出しを検出するには

        protected virtual void Dispose(bool disposing)
        {
            if (disposedValue)
            {
                return;
            }
            if (disposing)
            {
                if (_httpClient != null && _leaveDispose)
                {
                    _httpClient.Dispose();
                    _httpClient = null;
                }
            }

            disposedValue = true;
        }