Example #1
0
        private string?GetServerPathFromRegistry()
        {
            try
            {
                var serverPath = _registryReader
                                 .GetValueFromLocalMachine(@"SOFTWARE\WOW6432Node\bohemia interactive\arma 3", "main")?
                                 .ToString();

                return(_fileSystem.Directory.Exists(serverPath)
                    ? serverPath
                    : null);
            }
            catch (NullReferenceException)
            {
                return(null);
            }
        }