private static IIOProvider GetIOProvider() { if (_factory == null || _ioProvider == null) { lock (_lock) { if (_factory == null || _ioProvider == null) { try { _factory = new IOProviderFactory(); _ioProvider = _factory.CreateDefault(); } catch (ArgumentException ex) { HandleConfigurationError(ex); } catch (ConfigurationErrorsException ex) { HandleConfigurationError(ex); } } } } return(_ioProvider); }
private static IIOProvider GetIOProvider() { if (_ioProvider == null) { lock (_lock) { if (RuntimeInformation.IsUnittest) { return(_ioProvider = new LocalIOProvider()); } if (_ioProvider == null) { try { _factory = new IOProviderFactory(); _ioProvider = _factory.CreateDefault(); } catch (ArgumentException ex) { HandleConfigurationError(ex); } catch (ConfigurationErrorsException ex) { HandleConfigurationError(ex); } } } } return(_ioProvider); }
private static void Flush() { _factory = null; _ioProvider = null; }
private static IIOProvider GetIOProvider() { if (_factory == null || _ioProvider == null) { lock (_lock) { if (_factory == null || _ioProvider == null) { try { _factory = new IOProviderFactory(); _ioProvider = _factory.CreateDefault(); } catch (ArgumentException ex) { HandleConfigurationError(ex); } catch (ConfigurationErrorsException ex) { HandleConfigurationError(ex); } } } } return _ioProvider; }
private static IIOProvider GetIOProvider() { if (_ioProvider == null) { lock (_lock) { if (RuntimeInformation.IsUnittest) { return _ioProvider = new LocalIOProvider(); } if (_ioProvider == null) { try { _factory = new IOProviderFactory(); _ioProvider = _factory.CreateDefault(); } catch (ArgumentException ex) { HandleConfigurationError(ex); } catch (ConfigurationErrorsException ex) { HandleConfigurationError(ex); } } } } return _ioProvider; }