Sampler.psm1

#Region './Classes/1.class1.ps1' 0
class Class1
{
    [string]$Name = 'Class1'

    Class1()
    {
        #default Constructor
    }

    [String] ToString()
    {
        # Typo "calss" is intentional
        return ( 'This calss is {0}' -f $this.Name)
    }
}
#EndRegion './Classes/1.class1.ps1' 15
#Region './Classes/2.class2.ps1' 0
class Class2
{
    [string]$Name = 'Class2'

    Class2()
    {
        #default constructor
    }

    [String] ToString()
    {
        return ( 'This calss is {0}' -f $this.Name)
    }
}
#EndRegion './Classes/2.class2.ps1' 14
#Region './Classes/3.class11.ps1' 0
class Class11 : Class1
{
    [string]$Name = 'Class11'

    Class11 ()
    {
    }

    [String] ToString()
    {
        return ( 'This calss is {0}:{1}' -f $this.Name,'class1')
    }
}
#EndRegion './Classes/3.class11.ps1' 13
#Region './Classes/4.class12.ps1' 0
class Class12 : Class1
{
    [string]$Name = 'Class12'

    Class12 ()
    {
    }

    [String] ToString()
    {
        return ( 'This calss is {0}:{1}' -f $this.Name,'class1')
    }
}
#EndRegion './Classes/4.class12.ps1' 13
#Region './Private/Get-PrivateFunction.ps1' 0
function Get-PrivateFunction
{
    <#
      .SYNOPSIS
      This is a sample Private function only visible within the module.

      .DESCRIPTION
      This sample function is not exported to the module and only return the data passed as parameter.

      .EXAMPLE
      $null = Get-PrivateFunction -PrivateData 'NOTHING TO SEE HERE'

      .PARAMETER PrivateData
      The PrivateData parameter is what will be returned without transformation.

      #>

    [cmdletBinding()]
    param
    (
        [Parameter()]
        [String]
        $PrivateData
    )

    process
    {
        Write-Output $PrivateData
    }

}
#EndRegion './Private/Get-PrivateFunction.ps1' 30
#Region './Public/Get-Something.ps1' 0
function Get-Something
{
    <#
      .SYNOPSIS
      Sample Function to return input string.

      .DESCRIPTION
      This function is only a sample Advanced function that returns the Data given via parameter Data.

      .EXAMPLE
      Get-Something -Data 'Get me this text'


      .PARAMETER Data
      The Data parameter is the data that will be returned without transformation.

      #>

    [cmdletBinding(
        SupportsShouldProcess = $true,
        ConfirmImpact = 'Low'
    )]
    param
    (
        [Parameter(
            Mandatory = $true
            , ValueFromPipeline = $true
            , ValueFromPipelineByPropertyName = $true
        )]
        [String]
        $Data
    )

    process
    {
        if ($pscmdlet.ShouldProcess($Data))
        {
            Write-Verbose ('Returning the data: {0}' -f $Data)
            Get-PrivateFunction -PrivateData $Data
        }
        else
        {
            Write-Verbose 'oh dear'
        }
    }
}
#EndRegion './Public/Get-Something.ps1' 45
#Region './suffix.ps1' 0
# Inspired from https://github.com/nightroman/Invoke-Build/blob/64f3434e1daa806814852049771f4b7d3ec4d3a3/Tasks/Import/README.md#example-2-import-from-a-module-with-tasks
Get-ChildItem (Join-Path -Path $PSScriptRoot -ChildPath 'tasks\*') -Include '*.build.*' |
    ForEach-Object {
        $ModuleName = ([IO.FileInfo] $MyInvocation.MyCommand.Name).BaseName
        $taskFileAliasName = "$($_.BaseName).$ModuleName.ib.tasks"
        Set-Alias -Name $taskFileAliasName -Value $_.FullName
        Export-ModuleMember -Alias $taskFileAliasName
    }
#EndRegion './suffix.ps1' 8