Functions/New-IAWidgetConfigurationNumbersObject.ps1
Function New-IAWidgetConfigurationNumbersObject{ Param( [String]$FooterText, [String]$HeaderText = 'Current Value', [String]$MiddleText = 'Units', [String]$SideTextContent, [Bool]$SideTextEnabled = $false, [String]$SideTextPosition = "Right", [String]$SideTextWidth = "Single" ) #{"HeaderText":"Current Value","FooterText":"","MiddleText":"Units","SideTextEnabled":false,"SideTextPosition":"Right","SideTextWidth":"Single"} $IAWidgetConfigurationNumbersObject = New-Object -TypeName PSObject $IAWidgetConfigurationNumbersObject | Add-Member -MemberType NoteProperty -Name 'HeaderText' -Value $HeaderText $IAWidgetConfigurationNumbersObject | Add-Member -MemberType NoteProperty -Name 'MiddleText' -Value $MiddleText $IAWidgetConfigurationNumbersObject | Add-Member -MemberType NoteProperty -Name 'SideTextEnabled' -Value $SideTextEnabled $IAWidgetConfigurationNumbersObject | Add-Member -MemberType NoteProperty -Name 'SideTextPosition' -Value $SideTextPosition $IAWidgetConfigurationNumbersObject | Add-Member -MemberType NoteProperty -Name 'SideTextWidth' -Value $SideTextWidth if($SideTextContent){ $IAWidgetConfigurationNumbersObject | Add-Member -MemberType NoteProperty -Name 'SideTextContent' -Value $SideTextContent } if($FooterText){ $IAWidgetConfigurationNumbersObject | Add-Member -MemberType NoteProperty -Name 'FooterText' -Value $FooterText } return $IAWidgetConfigurationNumbersObject } |