Commit a4df51b8 authored by DeepakVerma's avatar DeepakVerma

Move clientname default value to configuration manager.

parent 3d48e200
...@@ -162,7 +162,7 @@ public static string TryNormalize(string value) ...@@ -162,7 +162,7 @@ public static string TryNormalize(string value)
/// <summary> /// <summary>
/// The client name to use for all connections /// The client name to use for all connections
/// </summary> /// </summary>
public string ClientName { get { return clientName ?? (clientName = AzureRoleInstanceId); } set { clientName = value; } } public string ClientName { get { return clientName ?? (clientName = (AzureRoleInstanceId != null ? AzureRoleInstanceId : Environment.GetEnvironmentVariable("ComputerName"))); } set { clientName = value; } }
/// <summary> /// <summary>
/// The number of times to repeat the initial connect cycle if no servers respond promptly /// The number of times to repeat the initial connect cycle if no servers respond promptly
......
...@@ -91,7 +91,7 @@ public ServerCounters GetCounters() ...@@ -91,7 +91,7 @@ public ServerCounters GetCounters()
/// <summary> /// <summary>
/// Gets the client-name that will be used on all new connections /// Gets the client-name that will be used on all new connections
/// </summary> /// </summary>
public string ClientName => configuration.ClientName ?? Environment.GetEnvironmentVariable("ComputerName"); public string ClientName => configuration.ClientName;
/// <summary> /// <summary>
/// Gets the configuration of the connection /// Gets the configuration of the connection
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment