From be83fce9d310e8989eb0da80adc2d5852a5b21a7 Mon Sep 17 00:00:00 2001 From: Haacked Date: Wed, 23 Sep 2015 13:58:35 -0700 Subject: [PATCH] :art: The most anal of cleanup Also disabled a R# warning so I stop seeing it since it doesn't apply. --- src/GitHub.Exports/Services/GitService.cs | 2 -- src/GitHub.Exports/Services/Services.cs | 5 +++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/GitHub.Exports/Services/GitService.cs b/src/GitHub.Exports/Services/GitService.cs index 4a9d9d63a2..2800aa869a 100644 --- a/src/GitHub.Exports/Services/GitService.cs +++ b/src/GitHub.Exports/Services/GitService.cs @@ -4,7 +4,6 @@ using GitHub.Primitives; using LibGit2Sharp; using Microsoft.VisualStudio.TeamFoundation.Git.Extensibility; -using GitHub.Extensions; namespace GitHub.Services { @@ -21,7 +20,6 @@ public class GitService : IGitService public UriString GetUri(IRepository repository) { return UriString.ToUriString(GetOriginUri(repository)?.ToRepositoryUrl()); - } /// diff --git a/src/GitHub.Exports/Services/Services.cs b/src/GitHub.Exports/Services/Services.cs index 1af09b5e54..717df6c6a8 100644 --- a/src/GitHub.Exports/Services/Services.cs +++ b/src/GitHub.Exports/Services/Services.cs @@ -50,7 +50,7 @@ public static IVsWebBrowsingService GetWebBrowsingService(this IServiceProvider public static IVsOutputWindow OutputWindow => GetGlobalService(); - static IVsOutputWindowPane outputWindowPane = null; + static IVsOutputWindowPane outputWindowPane; public static IVsOutputWindowPane OutputWindowPane { get @@ -61,7 +61,7 @@ public static IVsOutputWindowPane OutputWindowPane var uiShell = GetGlobalService(); // Get the frame of the output window var outputWindowGuid = new Guid("{34e76e81-ee4a-11d0-ae2e-00a0c90fffc3}"); - IVsWindowFrame outputWindowFrame = null; + IVsWindowFrame outputWindowFrame; ErrorHandler.ThrowOnFailure(uiShell.FindToolWindow((uint)__VSCREATETOOLWIN.CTW_fForceCreate, ref outputWindowGuid, out outputWindowFrame)); // Show the output window if (outputWindowFrame != null) @@ -78,6 +78,7 @@ public static IVsOutputWindowPane OutputWindowPane public static DTE Dte => GetGlobalService(); + // ReSharper disable once SuspiciousTypeConversion.Global public static DTE2 Dte2 => Dte as DTE2; public static IVsActivityLog GetActivityLog(this IServiceProvider provider)