This repository was archived by the owner on Jun 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Expand file tree
/
Copy pathTeamExplorerBase.cs
More file actions
57 lines (46 loc) · 1.5 KB
/
Copy pathTeamExplorerBase.cs
File metadata and controls
57 lines (46 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
using System;
using System.ComponentModel;
using System.Diagnostics;
using GitHub.Primitives;
using GitHub.Services;
using GitHub.Extensions;
namespace GitHub.VisualStudio.Base
{
public abstract class TeamExplorerBase : NotificationAwareObject, IDisposable
{
public static readonly Guid TeamExplorerConnectionsSectionId = new Guid("ef6a7a99-f01f-4c91-ad31-183c1354dd97");
protected IServiceProvider TEServiceProvider
{
get; set;
}
protected IGitHubServiceProvider ServiceProvider
{
get;
}
protected TeamExplorerBase(IGitHubServiceProvider serviceProvider)
{
Guard.ArgumentNotNull(serviceProvider, nameof(serviceProvider));
ServiceProvider = serviceProvider;
}
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
protected virtual void Dispose(bool disposing)
{
}
protected static void OpenInBrowser(Lazy<IVisualStudioBrowser> browser, Uri uri)
{
Guard.ArgumentNotNull(browser, nameof(browser));
Guard.ArgumentNotNull(uri, nameof(uri));
OpenInBrowser(browser.Value, uri);
}
protected static void OpenInBrowser(IVisualStudioBrowser browser, Uri uri)
{
Guard.ArgumentNotNull(browser, nameof(browser));
Guard.ArgumentNotNull(uri, nameof(uri));
browser?.OpenUrl(uri);
}
}
}