private void SetHomeLocation(string homeLocation) { if (!string.IsNullOrEmpty(homeLocation)) { try { Environment.SpecialFolder specialFolder = (Environment.SpecialFolder)Enum.Parse(typeof(Environment.SpecialFolder), homeLocation); _homeLocation = new Pidl(specialFolder); return; } catch (ArgumentException) {} catch (NotSupportedException) {} catch (Exception ex) { Platform.Log(LogLevel.Debug, ex, "The special folder {0} isn't available.", homeLocation); } Pidl pidl; if (Pidl.TryParse(homeLocation, out pidl)) { _homeLocation = pidl; return; } _homeLocation = null; } }