Entities/HostRecord.ps1


class HostRecord : BaseRecord {

    [string] $Address
    [string[]] $Names

    [string]ToString () {

        $contentBuilder = [System.Text.StringBuilder]::new();
        $contentBuilder.Append($this.Address);

        foreach ($name in $this.Names) {

            $contentBuilder.Append(' ');
            $contentBuilder.Append($name);
        }

        return $contentBuilder.ToString();
    }
}