Skip to content

Commit 6367cc3

Browse files
authored
Code cleanup on ConnectionType (#1594)
* Renaming connection type so it becomes more meaningful * Renaming back to void backwards compatibility issue * Also reverting TenantAdmin enum
1 parent d5fa1ed commit 6367cc3

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

src/Commands/Base/PnPConnection.cs

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,19 @@ internal PnPContext PnPContext
8989
/// </summary>
9090
public string ClientSecret { get; protected set; }
9191

92-
//public TelemetryClient TelemetryClient { get; set; }
92+
/// <summary>
93+
/// Azure Application Insights instance to provide telemetry
94+
/// </summary>
9395
public ApplicationInsights ApplicationInsights { get; set; }
9496

97+
/// <summary>
98+
/// Url of the SharePoint Online site to connect to
99+
/// </summary>
95100
public string Url { get; protected set; }
96101

102+
/// <summary>
103+
/// Url of the SharePoint Online Admin center to use. If omitted, it will try to automatically determine this.
104+
/// </summary>
97105
public string TenantAdminUrl { get; protected set; }
98106

99107
/// <summary>
@@ -106,6 +114,9 @@ internal PnPContext PnPContext
106114
/// </summary>
107115
public bool DeleteCertificateFromCacheOnDisconnect { get; internal set; }
108116

117+
/// <summary>
118+
/// ClientContext to use to execute Client Side Object Model (CSOM) requests
119+
/// </summary>
109120
public ClientContext Context { get; set; }
110121

111122
/// <summary>
@@ -117,6 +128,10 @@ internal PnPContext PnPContext
117128
/// Defines if this is a managed identity connection for use in cloud shell
118129
/// </summary>
119130
internal bool ManagedIdentity { get; set; }
131+
132+
/// <summary>
133+
/// Type of Azure cloud to connect to
134+
/// </summary>
120135
public AzureEnvironment AzureEnvironment { get; set; } = AzureEnvironment.Production;
121136

122137
private string _graphEndPoint;
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
11
namespace PnP.PowerShell.Commands.Enums
22
{
3+
/// <summary>
4+
/// Defines to what type of site collection in SharePoint Online a connection has been made
5+
/// </summary>
36
public enum ConnectionType
47
{
8+
/// <summary>
9+
/// Normal SharePoint Online site collection
10+
/// </summary>
511
O365 = 1,
12+
13+
/// <summary>
14+
/// SharePoint Online Admin site collection
15+
/// </summary>
616
TenantAdmin = 2,
717
}
818
}

0 commit comments

Comments
 (0)