11// Copyright Subatomix Research Inc.
22// SPDX-License-Identifier: MIT
33
4- // Don't require doc comments. Commands are documented via a help file.
5- #pragma warning disable CS1591
6-
74namespace PSql . Commands ;
85
96using static ApplicationIntent ;
@@ -12,6 +9,8 @@ namespace PSql.Commands;
129
1310/// <summary>
1411/// The <c>New-SqlContext</c> command.
12+ /// Creates an object specifying how to connect to SQL Server, Azure SQL
13+ /// Database, or compatible system.
1514/// </summary>
1615[ Cmdlet ( VerbsCommon . New , nameof ( SqlContext ) , DefaultParameterSetName = GenericName ) ]
1716[ OutputType ( typeof ( SqlContext ) ) ]
@@ -23,20 +22,24 @@ private const string
2322 CloneName = "Clone" ;
2423
2524 /// <summary>
26- /// <b>-Azure:</b> TODO
25+ /// <b>-Azure:</b>
26+ /// Specifies that the context connects to Azure SQL Database.
2727 /// </summary>
2828 [ Parameter ( ParameterSetName = AzureName , Mandatory = true ) ]
2929 public SwitchParameter Azure { get ; set ; }
3030
3131 /// <summary>
32- /// <b>-Source:</b> TODO
32+ /// <b>-Source:</b>
33+ /// A context previously created by this cmdlet from which to copy
34+ /// property values into the created context.
3335 /// </summary>
3436 [ Parameter ( ParameterSetName = CloneName , Mandatory = true , ValueFromPipeline = true ) ]
3537 [ ValidateNotNull ]
3638 public SqlContext ? Source { get ; set ; }
3739
3840 /// <summary>
39- /// <b>-ResourceGroupName:</b> TODO
41+ /// <b>-ResourceGroupName:</b>
42+ /// Name of the Azure resource group containing the database server.
4043 /// </summary>
4144 [ Alias ( "ResourceGroup" , "ServerResourceGroupName" ) ]
4245 [ Parameter ( ParameterSetName = AzureName , Position = 0 ) ]
@@ -45,7 +48,8 @@ private const string
4548 public string ? ResourceGroupName { get ; set ; }
4649
4750 /// <summary>
48- /// <b>-ServerResourceName:</b> TODO
51+ /// <b>-ServerResourceName:</b>
52+ /// Azure resource name of the database server.
4953 /// </summary>
5054 [ Alias ( "Resource" ) ]
5155 [ Parameter ( ParameterSetName = AzureName , Position = 1 ) ]
@@ -54,7 +58,8 @@ private const string
5458 public string ? ServerResourceName { get ; set ; }
5559
5660 /// <summary>
57- /// <b>-ServerName:</b> TODO
61+ /// <b>-ServerName:</b>
62+ /// DNS name of the database server.
5863 /// </summary>
5964 [ Alias ( "Server" ) ]
6065 [ Parameter ( ParameterSetName = GenericName , Position = 0 ) ]
@@ -64,7 +69,8 @@ private const string
6469 public string ? ServerName { get ; set ; }
6570
6671 /// <summary>
67- /// <b>-DatabaseName:</b> TODO
72+ /// <b>-DatabaseName:</b>
73+ /// Name of the database.
6874 /// </summary>
6975 [ Alias ( "Database" ) ]
7076 [ Parameter ( ParameterSetName = GenericName , Position = 1 ) ]
@@ -74,31 +80,35 @@ private const string
7480 public string ? DatabaseName { get ; set ; }
7581
7682 /// <summary>
77- /// <b>-AuthenticationMode:</b> TODO
83+ /// <b>-AuthenticationMode:</b>
84+ /// Method to use to authenticate with Azure SQL Database.
7885 /// </summary>
7986 [ Alias ( "Auth" ) ]
8087 [ Parameter ( ParameterSetName = AzureName ) ]
8188 [ Parameter ( ParameterSetName = CloneName ) ]
8289 public AzureAuthenticationMode AuthenticationMode { get ; set ; }
8390
8491 /// <summary>
85- /// <b>-Credential:</b> TODO
92+ /// <b>-Credential:</b>
93+ /// Credential to use to authenticate with the database server.
8694 /// </summary>
8795 [ Parameter ]
8896 [ Credential ]
8997 [ AllowNull ]
9098 public PSCredential ? Credential { get ; set ; } = PSCredential . Empty ;
9199
92100 /// <summary>
93- /// <b>-EncryptionMode:</b> TODO
101+ /// <b>-EncryptionMode:</b>
102+ /// Transport encryption to use for connections.
94103 /// </summary>
95104 [ Alias ( "Encryption" ) ]
96105 [ Parameter ( ParameterSetName = GenericName ) ]
97106 [ Parameter ( ParameterSetName = CloneName ) ]
98107 public EncryptionMode EncryptionMode { get ; set ; }
99108
100109 /// <summary>
101- /// <b>-ServerPort:</b> TODO
110+ /// <b>-ServerPort:</b>
111+ /// Remote TCP port of the database server.
102112 /// </summary>
103113 [ Alias ( "Port" ) ]
104114 [ Parameter ( ParameterSetName = GenericName ) ]
@@ -107,7 +117,8 @@ private const string
107117 public ushort ? ServerPort { get ; set ; }
108118
109119 /// <summary>
110- /// <b>-InstanceName:</b> TODO
120+ /// <b>-InstanceName:</b>
121+ /// Name of the database engine instance.
111122 /// </summary>
112123 [ Alias ( "Instance" ) ]
113124 [ Parameter ( ParameterSetName = GenericName ) ]
@@ -116,61 +127,73 @@ private const string
116127 public string ? InstanceName { get ; set ; }
117128
118129 /// <summary>
119- /// <b>-ReadOnlyIntent:</b> TODO
130+ /// <b>-ReadOnlyIntent:</b>
131+ /// Specifies that the client intends to perform only reads.
120132 /// </summary>
121133 [ Alias ( "ReadOnly" ) ]
122134 [ Parameter ]
123135 public SwitchParameter ReadOnlyIntent { get ; set ; }
124136
125137 /// <summary>
126- /// <b>-ClientName:</b> TODO
138+ /// <b>-ClientName:</b>
139+ /// Name of the client device.
127140 /// </summary>
128141 [ Alias ( "Client" ) ]
129142 [ Parameter ]
130143 [ AllowNull , AllowEmptyString ]
131144 public string ? ClientName { get ; set ; }
132145
133146 /// <summary>
134- /// <b>-ApplicationName:</b> TODO
147+ /// <b>-ApplicationName:</b>
148+ /// Name of the client application.
135149 /// </summary>
136150 [ Alias ( "Application" ) ]
137151 [ Parameter ]
138152 [ AllowNull , AllowEmptyString ]
139153 public string ? ApplicationName { get ; set ; }
140154
141155 /// <summary>
142- /// <b>-ConnectTimeout:</b> TODO
156+ /// <b>-ConnectTimeout:</b>
157+ /// Duration after which a connection attempt times out.
143158 /// </summary>
144159 [ Alias ( "Timeout" ) ]
145160 [ Parameter ]
146161 [ ValidateNullOrTimeout ]
147162 public TimeSpan ? ConnectTimeout { get ; set ; }
148163
149164 /// <summary>
150- /// <b>-ExposeCredentialInConnectionString:</b> TODO
165+ /// <b>-ExposeCredentialInConnectionString:</b>
166+ /// Specifies that the credential used for authentication should be
167+ /// exposed in connections' ConnectionString property.
151168 /// </summary>
152169 [ Parameter ]
153170 public SwitchParameter ExposeCredentialInConnectionString { get ; set ; }
154171
155172 /// <summary>
156- /// <b>-Pooling:</b> TODO
173+ /// <b>-Pooling:</b>
174+ /// Specifies that connections may be pooled to reduce setup and teardown
175+ /// time.
157176 /// </summary>
158177 [ Parameter ]
159178 public SwitchParameter Pooling { get ; set ; }
160179
161180 /// <summary>
162- /// <b>-MultipleActiveResultSets:</b> TODO
181+ /// <b>-MultipleActiveResultSets:</b>
182+ /// Specifies that connections support execution of multiple batches
183+ /// concurrently, with limitations.
163184 /// </summary>
164185 [ Alias ( "Mars" ) ]
165186 [ Parameter ]
166187 public SwitchParameter MultipleActiveResultSets { get ; set ; }
167188
168189 /// <summary>
169- /// <b>-Frozen:</b> TODO
190+ /// <b>-Frozen:</b>
191+ /// Specifies that the created context should be frozen.
170192 /// </summary>
171193 [ Parameter ]
172194 public SwitchParameter Frozen { get ; set ; }
173195
196+ /// <inheritdoc/>
174197 protected override void ProcessRecord ( )
175198 {
176199 var context = Source ? . Clone ( ) ?? CreateContext ( ) ;
0 commit comments