Last active
December 26, 2015 23:49
-
-
Save Konard/7233591 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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