Skip to content

Commit

Permalink
feat: Posh.Host.UI.Box.get/set_ColumnCount ( Fixes #384 )
Browse files Browse the repository at this point in the history
  • Loading branch information
James Brundage committed Mar 5, 2024
1 parent d111f4f commit c5496fb
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Types/Posh.Host.UI.Box/get_ColumnCount.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<#
.SYNOPSIS
Gets the number of columns in a box.
.DESCRIPTION
Gets the number of columns in a Posh.Host.UI.Box object.
.NOTES
This script checks if the '.ColumnCount' property is null and adds it as a NoteProperty with a default value of 0 if it is.
It then returns the value of the '.ColumnCount' property.
#>
if ($null -eq $this.'.ColumnCount') {
$this | Add-Member NoteProperty '.ColumnCount' 0 -Force
}
$this.'.ColumnCount'
11 changes: 11 additions & 0 deletions Types/Posh.Host.UI.Box/set_ColumnCount.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<#
.SYNOPSIS
Sets the number of columns in a box.
.DESCRIPTION
Sets the number of columns in a Posh.Host.UI.Box object.
#>
param(
[int]$ColumnCount
)
$this | Add-Member NoteProperty '.ColumnCount' $ColumnCount -Force

0 comments on commit c5496fb

Please sign in to comment.