Skip to content

Commit a99504a

Browse files
Removed JobStartedByParameterName value in output
1 parent d39fac6 commit a99504a

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/ServiceManagement/Automation/Commands.Automation/Model/Job.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// ----------------------------------------------------------------------------------
1212

1313
using System.Collections;
14+
using System.Globalization;
1415
using Microsoft.Azure.Commands.Automation.Common;
1516
using System;
1617
using System.Collections.Generic;
@@ -54,7 +55,8 @@ public Job(string accountName, WindowsAzure.Management.Automation.Models.Job job
5455
this.EndTime = job.Properties.EndTime;
5556
this.LastStatusModifiedTime = job.Properties.LastStatusModifiedTime;
5657
this.JobParameters = new Hashtable(StringComparer.InvariantCultureIgnoreCase);
57-
foreach (var kvp in job.Properties.Parameters)
58+
foreach (var kvp in job.Properties.Parameters.Where(kvp => 0 != String.Compare(kvp.Key, Constants.JobStartedByParameterName, CultureInfo.InvariantCulture,
59+
CompareOptions.IgnoreCase)))
5860
{
5961
this.JobParameters.Add(kvp.Key, (object)PowerShellJsonConverter.Deserialize(kvp.Value));
6062
}

src/ServiceManagement/Automation/Commands.Automation/Model/JobSchedule.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
using System;
1616
using System.Collections;
17+
using System.Globalization;
1718
using Microsoft.Azure.Commands.Automation.Common;
1819
using System.Collections.Generic;
1920
using System.Linq;
@@ -39,7 +40,8 @@ public JobSchedule(string automationAccountName, WindowsAzure.Management.Automat
3940
this.RunbookName = jobSchedule.Properties.Runbook.Name;
4041
this.ScheduleName = jobSchedule.Properties.Schedule.Name;
4142
this.Parameters = new Hashtable(StringComparer.InvariantCultureIgnoreCase);
42-
foreach (var kvp in jobSchedule.Properties.Parameters)
43+
foreach (var kvp in jobSchedule.Properties.Parameters.Where(kvp => 0 != String.Compare(kvp.Key, Constants.JobStartedByParameterName, CultureInfo.InvariantCulture,
44+
CompareOptions.IgnoreCase)))
4345
{
4446
this.Parameters.Add(kvp.Key, (object)PowerShellJsonConverter.Deserialize(kvp.Value));
4547
}

0 commit comments

Comments
 (0)