/// <summary> /// Syncs the collections on a PSJobPreparationTask with its wrapped OM object /// </summary> internal static void JobPreparationTaskSyncCollections(PSJobPreparationTask jobPrepTask) { if (jobPrepTask != null) { jobPrepTask.omObject.EnvironmentSettings = CreateSyncedDict( jobPrepTask.EnvironmentSettings, ConvertEnvironmentSetting); jobPrepTask.omObject.ResourceFiles = CreateSyncedList(jobPrepTask.ResourceFiles, ConvertResourceFile); } }
/// <summary> /// Syncs the collections on a PSJobPreparationTask with its wrapped OM object /// </summary> internal static void JobPreparationTaskSyncCollections(PSJobPreparationTask jobPrepTask) { if (jobPrepTask != null) { jobPrepTask.omObject.EnvironmentSettings = CreateSyncedList(jobPrepTask.EnvironmentSettings, (e) => { EnvironmentSetting envSetting = new EnvironmentSetting(e.Name, e.Value); return(envSetting); }); jobPrepTask.omObject.ResourceFiles = CreateSyncedList(jobPrepTask.ResourceFiles, (r) => { ResourceFile resourceFile = new ResourceFile(r.BlobSource, r.FilePath); return(resourceFile); }); } }