Skip to content

Commit bf028fa

Browse files
authored
Updated XML docs for UseDefaultCredentialsForProxy (#175)
1 parent 1c1e2c9 commit bf028fa

File tree

12 files changed

+22
-23
lines changed

12 files changed

+22
-23
lines changed

src/NLog.Extensions.AzureBlobStorage/BlobStorageTarget.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,9 @@ public sealed class BlobStorageTarget : AsyncTaskTarget
130130
public Layout ProxyPassword { get; set; }
131131

132132
/// <summary>
133-
/// Uses the default credentials (<see cref="System.Net.CredentialCache.DefaultCredentials"/>) for the proxy server, overriding any values that may have been set in <see cref="ProxyLogin"/> and <see cref="ProxyPassword"/>.
133+
/// Uses the default credentials (<see cref="System.Net.CredentialCache.DefaultCredentials"/>) for the proxy server.
134134
/// </summary>
135+
/// <remarks>Take precedence over <see cref = "ProxyLogin" /> and <see cref="ProxyPassword"/> when set to <see langword="true"/>.</remarks>
135136
public bool UseDefaultCredentialsForProxy { get; set; }
136137

137138
/// <summary>

src/NLog.Extensions.AzureBlobStorage/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ _proxyLogin_ - Login to use for the proxy server. Requires `proxyPassword`.
6969

7070
_proxyPassword_ - Password to use for the proxy server. Requires `proxyLogin`.
7171

72-
_useDefaultCredentialsForProxy_ - Uses the default credentials (`System.Net.CredentialCache.DefaultCredentials`) for the proxy server.
72+
_useDefaultCredentialsForProxy_ - Uses the default credentials (`System.Net.CredentialCache.DefaultCredentials`) for the proxy server. Take precedence over `proxyLogin` and `proxyPassword` when set to `true`.
7373

7474
### Batching Policy
7575

src/NLog.Extensions.AzureDataTables/DataTablesTarget.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,11 +167,11 @@ public override int GetHashCode()
167167
public Layout ProxyPassword { get; set; }
168168

169169
/// <summary>
170-
/// Uses the default credentials (<see cref="System.Net.CredentialCache.DefaultCredentials"/>) for the proxy server, overriding any values that may have been set in <see cref="ProxyLogin"/> and <see cref="ProxyPassword"/>.
170+
/// Uses the default credentials (<see cref="System.Net.CredentialCache.DefaultCredentials"/>) for the proxy server.
171171
/// </summary>
172+
/// <remarks>Take precedence over <see cref = "ProxyLogin" /> and <see cref="ProxyPassword"/> when set to <see langword="true"/>.</remarks>
172173
public bool UseDefaultCredentialsForProxy { get; set; }
173174

174-
175175
/// <summary>
176176
/// Gets or sets the name of the Azure table where log entries will be stored.
177177
/// </summary>

src/NLog.Extensions.AzureDataTables/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ _proxyLogin_ - Login to use for the proxy server. Requires `proxyPassword`.
6868

6969
_proxyPassword_ - Password to use for the proxy server. Requires `proxyLogin`.
7070

71-
_useDefaultCredentialsForProxy_ - Uses the default credentials (`System.Net.CredentialCache.DefaultCredentials`) for the proxy server.
71+
_useDefaultCredentialsForProxy_ - Uses the default credentials (`System.Net.CredentialCache.DefaultCredentials`) for the proxy server. Take precedence over `proxyLogin` and `proxyPassword` when set to `true`.
7272

7373
### Dynamic TableEntity
7474
Instead of using the predefined NLogEntity-properties, then one can specify wanted properties:

src/NLog.Extensions.AzureEventGrid/EventGridTarget.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,9 @@ public string DataFormat
152152
public Layout ProxyPassword { get; set; }
153153

154154
/// <summary>
155-
/// Uses the default credentials (<see cref="System.Net.CredentialCache.DefaultCredentials"/>) for the proxy server, overriding any values that may have been set in <see cref="ProxyLogin"/> and <see cref="ProxyPassword"/>.
155+
/// Uses the default credentials (<see cref="System.Net.CredentialCache.DefaultCredentials"/>) for the proxy server.
156156
/// </summary>
157+
/// <remarks>Take precedence over <see cref = "ProxyLogin" /> and <see cref="ProxyPassword"/> when set to <see langword="true"/>.</remarks>
157158
public bool UseDefaultCredentialsForProxy { get; set; }
158159

159160
/// <summary>

src/NLog.Extensions.AzureEventGrid/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ _proxyLogin_ - Login to use for the proxy server. Requires `proxyPassword`.
7474

7575
_proxyPassword_ - Password to use for the proxy server. Requires `proxyLogin`.
7676

77-
_useDefaultCredentialsForProxy_ - Uses the default credentials (`System.Net.CredentialCache.DefaultCredentials`) for the proxy server.
77+
_useDefaultCredentialsForProxy_ - Uses the default credentials (`System.Net.CredentialCache.DefaultCredentials`) for the proxy server. Take precedence over `proxyLogin` and `proxyPassword` when set to `true`.
7878

7979
### Retry Policy
8080

src/NLog.Extensions.AzureEventHub/EventHubTarget.cs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,9 @@ public class EventHubTarget : AsyncTaskTarget
201201
public Layout ProxyPassword { get; set; }
202202

203203
/// <summary>
204-
/// Uses the default credentials (<see cref="System.Net.CredentialCache.DefaultCredentials"/>) for the proxy server, overriding any values that may have been set in <see cref="ProxyLogin"/> and <see cref="ProxyPassword"/>.
204+
/// Uses the default credentials (<see cref="System.Net.CredentialCache.DefaultCredentials"/>) for the proxy server.
205205
/// </summary>
206-
/// <remarks>Only applies when <see cref="UseWebSockets"/> = <see langword="true"/></remarks>
206+
/// <remarks>Only applies when <see cref="UseWebSockets"/> = <see langword="true"/>. Take precedence over <see cref = "ProxyLogin" /> and <see cref="ProxyPassword"/> when set to <see langword="true"/>.</remarks>
207207
public bool UseDefaultCredentialsForProxy { get; set; }
208208

209209
/// <summary>
@@ -261,7 +261,6 @@ protected override void InitializeTarget()
261261
string clientAuthSecret = string.Empty;
262262
string eventHubName = string.Empty;
263263
string useWebSockets = string.Empty;
264-
string webSocketProxyAddress = string.Empty;
265264
string customEndPointAddress = string.Empty;
266265
string eventProducerIdentifier = string.Empty;
267266

@@ -287,7 +286,7 @@ protected override void InitializeTarget()
287286
eventProducerIdentifier = EventProducerIdentifier?.Render(defaultLogEvent) ?? string.Empty;
288287

289288
useWebSockets = UseWebSockets?.Render(defaultLogEvent) ?? string.Empty;
290-
if (!string.IsNullOrEmpty(useWebSockets) && (string.Equals(useWebSockets.Trim(), bool.TrueString, StringComparison.OrdinalIgnoreCase) || string.Equals(useWebSockets.Trim(), "1", StringComparison.OrdinalIgnoreCase)))
289+
if (string.Equals(useWebSockets.Trim(), bool.TrueString, StringComparison.OrdinalIgnoreCase) || string.Equals(useWebSockets.Trim(), "1", StringComparison.OrdinalIgnoreCase))
291290
{
292291
useWebSockets = bool.TrueString;
293292
}
@@ -301,7 +300,6 @@ protected override void InitializeTarget()
301300
Login = ProxyLogin?.Render(defaultLogEvent),
302301
Password = ProxyPassword?.Render(defaultLogEvent)
303302
};
304-
proxySettings = proxySettings.RequiresManualProxyConfiguration ? proxySettings : null;
305303

306304
_eventHubService.Connect(connectionString, eventHubName, serviceUri, tenantIdentity, managedIdentityResourceId, managedIdentityClientId, sharedAccessSignature, storageAccountName, storageAccountAccessKey, clientAuthId, clientAuthSecret, eventProducerIdentifier, bool.TrueString == useWebSockets, customEndPointAddress, proxySettings);
307305
InternalLogger.Debug("AzureEventHubTarget(Name={0}): Initialized", Name);
@@ -615,7 +613,7 @@ public void Connect(string connectionString, string eventHubName, string service
615613
{
616614
options = new Azure.Messaging.EventHubs.Producer.EventHubProducerClientOptions();
617615
options.ConnectionOptions.TransportType = useWebSockets ? EventHubsTransportType.AmqpWebSockets : options.ConnectionOptions.TransportType;
618-
if (useWebSockets && proxySettings != null)
616+
if (useWebSockets && proxySettings?.RequiresManualProxyConfiguration == true)
619617
options.ConnectionOptions.Proxy = proxySettings.CreateWebProxy(options.ConnectionOptions.Proxy);
620618
if (!string.IsNullOrEmpty(endPointAddress))
621619
options.ConnectionOptions.CustomEndpointAddress = new Uri(endPointAddress);

src/NLog.Extensions.AzureEventHub/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ _proxyLogin_ - Login to use for the proxy server. Requires `proxyPassword`. Requ
8888

8989
_proxyPassword_ - Password to use for the proxy server. Requires `proxyLogin`. Requires `useWebSockets = true`.
9090

91-
_useDefaultCredentialsForProxy_ - Uses the default credentials (`System.Net.CredentialCache.DefaultCredentials`) for the proxy server. Requires `useWebSockets = true`.
91+
_useDefaultCredentialsForProxy_ - Uses the default credentials (`System.Net.CredentialCache.DefaultCredentials`) for the proxy server. Take precedence over `proxyLogin` and `proxyPassword` when set to `true`. Requires `useWebSockets = true`.
9292

9393
### Batching Policy
9494

src/NLog.Extensions.AzureQueueStorage/QueueStorageTarget.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,9 @@ public sealed class QueueStorageTarget : AsyncTaskTarget
126126
public Layout ProxyPassword { get; set; }
127127

128128
/// <summary>
129-
/// Uses the default credentials (<see cref="System.Net.CredentialCache.DefaultCredentials"/>) for the proxy server, overriding any values that may have been set in <see cref="ProxyLogin"/> and <see cref="ProxyPassword"/>.
129+
/// Uses the default credentials (<see cref="System.Net.CredentialCache.DefaultCredentials"/>) for the proxy server.
130130
/// </summary>
131+
/// <remarks>Take precedence over <see cref = "ProxyLogin" /> and <see cref="ProxyPassword"/> when set to <see langword="true"/>.</remarks>
131132
public bool UseDefaultCredentialsForProxy { get; set; }
132133

133134
/// <summary>

src/NLog.Extensions.AzureQueueStorage/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ _proxyLogin_ - Login to use for the proxy server. Requires `proxyPassword`.
6767

6868
_proxyPassword_ - Password to use for the proxy server. Requires `proxyLogin`.
6969

70-
_useDefaultCredentialsForProxy_ - Uses the default credentials (`System.Net.CredentialCache.DefaultCredentials`) for the proxy server.
70+
_useDefaultCredentialsForProxy_ - Uses the default credentials (`System.Net.CredentialCache.DefaultCredentials`) for the proxy server. Take precedence over `proxyLogin` and `proxyPassword` when set to `true`.
7171

7272
### Batching Policy
7373

0 commit comments

Comments
 (0)