Skip to content

Instantly share code, notes, and snippets.

@Konard
Last active December 26, 2015 23:49
Show Gist options
  • Save Konard/7233591 to your computer and use it in GitHub Desktop.
Save Konard/7233591 to your computer and use it in GitHub Desktop.
Resharper suggestions
1
.Where(x => x.ErrorContent is string).Select(x => (string)x.ErrorContent)
заменять на
.Select(x => x.ErrorContent).OfType<string>()
2
Предлагать убирать прописанные атрибуты в xaml, которые устанавливают значения такие же какие они и есть по умолчанию.
3
// private static string _connectionString;
if (_connectionString == null)
_connectionString = ConfigurationManager.ConnectionStrings["AISArchive"].ConnectionString;
return _connectionString;
заменяется на
return _connectionString ??
(_connectionString = ConfigurationManager.ConnectionStrings["AISArchive"].ConnectionString);
Предлагать такую же замену для
// private static int? _sqlCommandTimeout;
if (_sqlCommandTimeout == null)
_sqlCommandTimeout = DBHelper.Administration.Settings.Get("SQLCommandTimeout").ToInt();
return _sqlCommandTimeout.Value;
заменять на
return _sqlCommandTimeout ??
(int)(_sqlCommandTimeout = DBHelper.Administration.Settings.Get("SQLCommandTimeout").ToInt());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment