Fix some more code analysis issues

This commit is contained in:
Andreia Gaita 2015-02-13 21:07:36 +01:00
Родитель bdb191366c
Коммит c2a3910e2c
6 изменённых файлов: 11 добавлений и 9 удалений

Просмотреть файл

@ -128,8 +128,9 @@ namespace GitHub.VisualStudio
return;
var solService = ServiceProvider.GetSolution();
var ret = solService.AdviseSolutionEvents(new SolutionEventListener(SolutionOpen), out cookie);
Debug.Assert(ErrorHandler.Succeeded(ret), "Unable to start listening for solution events");
if (!ErrorHandler.Succeeded(solService.AdviseSolutionEvents(new SolutionEventListener(SolutionOpen), out cookie))) {
Debug.Assert(false, "Unable to start listening for solution events");
}
}
void UnsubscribeSolutionEvents()
@ -139,8 +140,9 @@ namespace GitHub.VisualStudio
return;
var solService = ServiceProvider.GetSolution();
var ret = solService.UnadviseSolutionEvents(cookie);
Debug.Assert(ErrorHandler.Succeeded(ret), "Unable to stop listening for solution events");
if (!ErrorHandler.Succeeded(solService.UnadviseSolutionEvents(cookie))) {
Debug.Assert(false, "Unable to stop listening for solution events");
}
cookie = 0;
}

Просмотреть файл

@ -13,7 +13,7 @@ namespace GitHub.VisualStudio
[TeamExplorerNavigationItem(GraphsNavigationItemId,
NavigationItemPriority.Graphs,
TargetPageId = TeamExplorerPageIds.Home)]
class GraphsNavigationItem : TeamExplorerNavigationItemBase
public class GraphsNavigationItem : TeamExplorerNavigationItemBase
{
public const string GraphsNavigationItemId = "5245767A-B657-4F8E-BFEE-F04159F1DDA5";

Просмотреть файл

@ -13,7 +13,7 @@ namespace GitHub.VisualStudio
[TeamExplorerNavigationItem(IssuesNavigationItemId,
NavigationItemPriority.Issues,
TargetPageId = TeamExplorerPageIds.Home)]
class IssuesNavigationItem : TeamExplorerNavigationItemBase
public class IssuesNavigationItem : TeamExplorerNavigationItemBase
{
public const string IssuesNavigationItemId = "5245767A-B657-4F8E-BFEE-F04159F1DDA4";

Просмотреть файл

@ -13,7 +13,7 @@ namespace GitHub.VisualStudio
[TeamExplorerNavigationItem(PullRequestsNavigationItemId,
NavigationItemPriority.PullRequests,
TargetPageId = TeamExplorerPageIds.Home)]
class PullRequestsNavigationItem : TeamExplorerNavigationItemBase
public class PullRequestsNavigationItem : TeamExplorerNavigationItemBase
{
public const string PullRequestsNavigationItemId = "5245767A-B657-4F8E-BFEE-F04159F1DDA3";

Просмотреть файл

@ -13,7 +13,7 @@ namespace GitHub.VisualStudio
[TeamExplorerNavigationItem(PulseNavigationItemId,
NavigationItemPriority.Pulse,
TargetPageId = TeamExplorerPageIds.Home)]
class PulseNavigationItem : TeamExplorerNavigationItemBase
public class PulseNavigationItem : TeamExplorerNavigationItemBase
{
public const string PulseNavigationItemId = "5245767A-B657-4F8E-BFEE-F04159F1DDA2";

Просмотреть файл

@ -13,7 +13,7 @@ namespace GitHub.VisualStudio
[TeamExplorerNavigationItem(WikiNavigationItemId,
NavigationItemPriority.Wiki,
TargetPageId = TeamExplorerPageIds.Home)]
class WikiNavigationItem : TeamExplorerNavigationItemBase
public class WikiNavigationItem : TeamExplorerNavigationItemBase
{
public const string WikiNavigationItemId = "5245767A-B657-4F8E-BFEE-F04159F1DDA1";