OnQ.types.ps1xml
<?xml version="1.0" encoding="utf-16"?>
<!-- Generated with EZOut 1.8.3.1: Install-Module EZOut or https://github.com/StartAutomating/EZOut --> <Types> <Type> <Name>OnQ.EventSource</Name> <Members> <ScriptProperty> <Name>Description</Name> <GetScriptBlock> # From ?<PowerShell_HelpField> in Irregular (https://github.com/StartAutomating/Irregular) [Regex]::new(@' \.(?<Field>Description) # Field Start \s{0,} # Optional Whitespace (?<Content>(.|\s)+?(?=(\.\w+|\#\>))) # Anything until the next .\field or end of the comment block '@, 'IgnoreCase,IgnorePatternWhitespace', [Timespan]::FromSeconds(1)).Match( $this.ScriptBlock ).Groups["Content"].Value </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>EventSourceID</Name> <GetScriptBlock> if ($this -is [Management.Automation.ExternalScriptInfo]) { $this.Path # the key is the path. } elseif ($this.Module) { # If it was from a module $this.Module + '\' + $this.Name # it's the module qualified name. } else { $this.Name # Otherwise, it's just the function name. } </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Help</Name> <GetScriptBlock> Get-Help $this.EventSourceId </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Synopsis</Name> <GetScriptBlock> # From ?<PowerShell_HelpField> in Irregular (https://github.com/StartAutomating/Irregular) [Regex]::new(@' \.(?<Field>Synopsis) # Field Start \s{0,} # Optional Whitespace (?<Content>(.|\s)+?(?=(\.\w+|\#\>))) # Anything until the next .\field or end of the comment block '@, 'IgnoreCase,IgnorePatternWhitespace', [Timespan]::FromSeconds(1)).Match( $this.ScriptBlock ).Groups["Content"].Value </GetScriptBlock> </ScriptProperty> </Members> </Type> </Types> |