DSCResources/SYN_SynergyDEIntegration/SYN_SynergyDEIntegration.psm1

DATA localizedData
{
    #culture en-US
    ConvertFrom-StringData @'
    InstallerFileNotFound = The installer file was not found at '{0}'
'@

}

# Import the common Synergy functions
Import-Module -Name ( Join-Path `
    -Path(Split-Path -Path $PSSCriptRoot -Parent) `
    -ChildPath '\SynergyInstallCommon\SynergyInstallCommon.psm1')

function Get-TargetResource
{
    [CmdletBinding()]
    [OutputType([System.Collections.Hashtable])]
    param
    ()
    @(
        Installer File = $InstallerFile
        Visual Studio Support = $VisualStudioSupport
    )
}

function Set-TargetResource
{
    [CmdletBinding()]
    param
    (
        # Installation asset location
        [Parameter(Mandatory = $true)]
        [String]
        $InstallerFile,

        # Should Visual Studio Support be installed
        [Parameter()]
        [ValidateSet('Present', 'Absent')]
        [String]
        $VisualStudioSupport = 'Present'
    )
}

function Test-TargetResource
{
    [CmdletBinding()]
    [OutputType([System.Boolean])]
    param
    (
        # Installation asset location
        [Parameter(Mandatory = $true)]
        [String]
        $InstallerFile,

        # Should Visual Studio Support be installed
        [Parameter()]
        [ValidateSet('Present', 'Absent')]
        [String]
        $VisualStudioSupport = 'Present'
    )

    if (-NOT (Test-Path $InstallerFile))
    {
        Throw ($localizedData.InstallerFileNotFound -f $InstallerFile)
    }
}

Export-ModuleMember -Function *-TargetResource