Skip to content

Commit 63976ea

Browse files
KalpeshChavan12Kalpesh Chavan
andauthored
Added PreTask and PostTask in model to fix breaking changes. (#22421)
* Added PreTask and PostTask in model to fix breaking changes. * Removed positional mapping and ignored pretask and post task attributes --------- Co-authored-by: Kalpesh Chavan <[email protected]>
1 parent 7cfc158 commit 63976ea

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

src/Maintenance/Maintenance/ConfigurationAssignment/ConfigurationAssignmentGetMethod.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@ public override void ExecuteCmdlet()
136136

137137
[Parameter(
138138
ParameterSetName = "DefaultParameter",
139-
Position = 4,
140139
Mandatory = false,
141140
HelpMessage = "Configuration assignment name.",
142141
ValueFromPipelineByPropertyName = true)]

src/Maintenance/Maintenance/Models/MaintenanceAutoMapperProfile.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ private static void Initialize()
8686
.ForMember(dest => dest.WindowParameterKbNumberToExclude, opt => opt.MapFrom(src => src.InstallPatches.WindowsParameters.KbNumbersToExclude))
8787
.ForMember(dest => dest.WindowParameterKbNumberToInclude, opt => opt.MapFrom(src => src.InstallPatches.WindowsParameters.KbNumbersToInclude))
8888
.ForMember(dest => dest.InstallPatchRebootSetting, opt => opt.MapFrom(src => src.InstallPatches.RebootSetting))
89+
.ForMember(dest => dest.PreTask, opt => opt.Ignore())
90+
.ForMember(dest => dest.PostTask, opt => opt.Ignore())
8991
.ForSourceMember(src => src.SystemData, s => s.Ignore());
9092
cfg.CreateMap<TO.PSMaintenanceConfiguration, FROM.MaintenanceConfiguration>()
9193
.ForPath(dest => dest.InstallPatches.LinuxParameters.ClassificationsToInclude, src => src.MapFrom(o => o.LinuxParameterClassificationToInclude))

src/Maintenance/Maintenance/Models/PSMaintenanceConfiguration.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ public partial class PSMaintenanceConfiguration
4040
public HashSet<string> WindowParameterKbNumberToExclude { get; set; }
4141
public HashSet<string> WindowParameterClassificationToInclude { get; set; }
4242
public bool? WindowParameterExcludeKbRequiringReboot { get; set; }
43+
public string PreTask { get; set; }
44+
public string PostTask { get; set; }
4345
public string InstallPatchRebootSetting { get; set; }
4446

4547
}

0 commit comments

Comments
 (0)