@@ -46,15 +46,13 @@ public DeviceDetails GetDeviceDetails(string deviceId)
46
46
/// <param name="deviceDetails">Current device details for the device.</param>
47
47
/// <param name="newName">New friendly name for the device. Null if its not to be changed</param>
48
48
/// <param name="timeZone">New timeZone value for the device. Null if its not to be changed</param>
49
- /// <param name="primaryDnsServer">New primary DNS server address for the device. Null if its not to be changed</param>
50
49
/// <param name="secondaryDnsServer">New Secondary DNS Server address for the device. Null if its not to be changed</param>
51
50
/// <param name="networkConfigs">An array or NetworkConfig objects for different interfaces. Null if its not to be changed</param>
52
51
/// <returns></returns>
53
- public TaskStatusInfo UpdateDeviceDetails ( DeviceDetails deviceDetails , string newName , TimeZoneInfo timeZone , IPAddress primaryDnsServer ,
54
- IPAddress secondaryDnsServer , NetworkConfig [ ] networkConfigs )
52
+ public TaskStatusInfo UpdateDeviceDetails ( DeviceDetails deviceDetails , string newName , TimeZoneInfo timeZone , IPAddress secondaryDnsServer , NetworkConfig [ ] networkConfigs )
55
53
{
56
54
// Update the object
57
- this . UpdateDeviceDetailsObject ( deviceDetails , newName , timeZone , primaryDnsServer , secondaryDnsServer , networkConfigs ) ;
55
+ this . UpdateDeviceDetailsObject ( deviceDetails , newName , timeZone , secondaryDnsServer , networkConfigs ) ;
58
56
// Copy stuff over from the DeviceDetails object into a new DeviceDetailsRequest object.
59
57
var request = new DeviceDetailsRequest ( ) ;
60
58
MiscUtils . CopyProperties ( deviceDetails , request ) ;
@@ -153,8 +151,7 @@ private void UpdateDeviceDetailsWithNetworkConfig(DeviceDetails details, Network
153
151
/// Modify the provided DeviceDetails object with the data provided
154
152
/// </summary>
155
153
/// <param name="details"></param>
156
- private void UpdateDeviceDetailsObject ( DeviceDetails deviceDetails , string newName , TimeZoneInfo timeZone , IPAddress primaryDnsServer ,
157
- IPAddress secondaryDnsServer , NetworkConfig [ ] networkConfigs )
154
+ private void UpdateDeviceDetailsObject ( DeviceDetails deviceDetails , string newName , TimeZoneInfo timeZone , IPAddress secondaryDnsServer , NetworkConfig [ ] networkConfigs )
158
155
{
159
156
// modify details for non-null data provided to cmdlet
160
157
@@ -167,19 +164,7 @@ private void UpdateDeviceDetailsObject(DeviceDetails deviceDetails, string newNa
167
164
{
168
165
deviceDetails . TimeServer . TimeZone = timeZone . StandardName ;
169
166
}
170
- if ( primaryDnsServer != null )
171
- {
172
- var primaryDnsString = primaryDnsServer . ToString ( ) ;
173
- var primaryDnsType = primaryDnsServer . AddressFamily ;
174
- if ( primaryDnsType == AddressFamily . InterNetwork ) // IPv4
175
- {
176
- deviceDetails . DnsServer . PrimaryIPv4 = primaryDnsString ;
177
- }
178
- else if ( primaryDnsType == AddressFamily . InterNetworkV6 )
179
- {
180
- deviceDetails . DnsServer . PrimaryIPv6 = primaryDnsString ;
181
- }
182
- }
167
+
183
168
if ( secondaryDnsServer != null )
184
169
{
185
170
var secondaryDnsString = secondaryDnsServer . ToString ( ) ;
0 commit comments