Sample.IntegrationTests.EnvironmentSettingsMutex.Dispose C# (CSharp) Method

Dispose() public method

public Dispose ( ) : void
return void
        public void Dispose()
        {
            while (_toRestore.Any())
            {
                var kvp = _toRestore.Pop();
                Environment.SetEnvironmentVariable(kvp.Key, kvp.Value);
            }

            _semaphore.Release();
        }

Usage Example

コード例 #1
0
 public void TearDown()
 {
     _environmentSettingsMutex.Dispose();
 }