Skip to content

Commit 1fef5c0

Browse files
committed
#6 Converted Guid List to GuidCollection
1 parent 3a63041 commit 1fef5c0

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

APIWrapper.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ public string CreateUpdatePolicy(string name, string bulletinGuids, string targe
190190
}
191191
SoftwareUpdateAdvertismentSet newAdvertismentSet = item.GetNewAdvertismentSet();
192192
newAdvertismentSet.Initialise(gc);
193-
SoftwareUpdateDistributionTask task = Item.GetItem(Tasks.Singletons70.SoftwareUpdateDistrbutionTask, ItemLoadFlags.WriteableIgnoreAll) as SoftwareUpdateDistributionTask;
193+
SoftwareUpdateDistributionTask task = Item.GetItem(Tasks.Singletons70.SoftwareUpdateDistrbutionTask, ItemLoadFlags.WriteableIgnoreAll) as SoftwareUpdateDistributionTask;
194194
if (task == null) {
195195
return "Cannot initialise of SoftwareUpdateDistrbutionTask. Item is missing from the database";
196196
}
@@ -227,8 +227,12 @@ public string CreateUpdatePolicy(string name, string bulletinGuids, List<string>
227227
if (item == null) {
228228
return string.Format("Unable to load vendor policy {0}", platformPolicy);
229229
}
230+
GuidCollection gc = new GuidCollection();
231+
foreach (Guid g in suGuids) {
232+
gc.Add(g);
233+
}
230234
SoftwareUpdateAdvertismentSet newAdvertismentSet = item.GetNewAdvertismentSet();
231-
newAdvertismentSet.Initialise((GuidCollection)suGuids);
235+
newAdvertismentSet.Initialise(gc);
232236
SoftwareUpdateDistributionTask task = Item.GetItem(Tasks.Singletons70.SoftwareUpdateDistrbutionTask, ItemLoadFlags.WriteableIgnoreAll) as SoftwareUpdateDistributionTask;
233237
if (task == null) {
234238
return "Cannot initialise of SoftwareUpdateDistrbutionTask. Item is missing from the database";

0 commit comments

Comments
 (0)