Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
serialization fix at parameter level
  • Loading branch information
FriedrichWeinmann committed Oct 6, 2024
commit d552c33f3d5ba3f8f9d3fcabcdc233b4db1e5c99
Binary file modified PSModuleDevelopment/bin/PSModuleDevelopment.dll
Binary file not shown.
Binary file modified PSModuleDevelopment/bin/PSModuleDevelopment.pdb
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@
[OutputType([PSModuleDevelopment.Template.TemplateResult])]
[CmdletBinding()]
param (
[PSFramework.Utility.ScriptTransformation('PSModuleDevelopment.TemplateItem', [PSModuleDevelopment.Template.TemplateItemBase])]
[PSModuleDevelopment.Template.TemplateItemBase]
$Item,

Expand Down
8 changes: 7 additions & 1 deletion PSModuleDevelopment/internal/scripts/initialize.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,10 @@ if (-not (Test-Path (Get-PSFConfigValue -FullName 'PSModuleDevelopment.Debug.Con
#endregion Ensure Config path exists

# Pass on the host UI to the library
[PSModuleDevelopment.Utility.UtilityHost]::RawUI = $host.UI.RawUI
[PSModuleDevelopment.Utility.UtilityHost]::RawUI = $host.UI.RawUI

# Register Type-Conversion to fix template issues in serialization edge-casaes
Register-PSFArgumentTransformationScriptblock -Name 'PSModuleDevelopment.TemplateItem' -Scriptblock {
if ($_ -is [PSModuleDevelopment.Template.TemplateItemBase]) { return $_ }
[PSModuleDevelopment.Template.TemplateHost]::GetTemplateItem($_)
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace PSModuleDevelopment.Template
/// <summary>
/// Static helpers for the template system
/// </summary>
internal static class TemplateHost
public static class TemplateHost
{
internal static TemplateItemBase GetTemplateItem(object Item)
{
Expand Down