Skip to content

Commit

Permalink
SqlServerDsc.Common: Fix comment-based help and remove debug code (#1549
Browse files Browse the repository at this point in the history
)
  • Loading branch information
johlju authored May 17, 2020
1 parent eb0cc62 commit 7f14116
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ in a future release.
- Fixing a problem with the latest ModuleBuild 1.7.0 that breaks the CI
pipeline.
- SqlServerDsc.Common
- Added function `Import-Assembly`.
- Added function `Import-Assembly` that can help import an assembly
into the PowerShell session.
- Prepared unit tests to support Pester 5 so a minimal conversation
is only needed later.
- Updated `Import-SQLPSModule` to better support unit tests.
Expand Down
8 changes: 3 additions & 5 deletions source/Modules/SqlServerDsc.Common/SqlServerDsc.Common.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -672,10 +672,11 @@ function Connect-SQLAnalysis

<#
.SYNOPSIS
Returns a reference to the ConnectionInfo assembly.
Imports the assembly into the session.
.DESCRIPTION
Returns a reference to the ConnectionInfo assembly.
Imports the assembly into the session and returns a reference to the
assembly.
.PARAMETER Name
Specifies the name of the assembly to load.
Expand Down Expand Up @@ -724,12 +725,10 @@ function Import-Assembly
{
if ($LoadWithPartialName.IsPresent)
{
Write-Verbose -Message 'DEBUG1' -Verbose
$assemblyInformation = [System.Reflection.Assembly]::LoadWithPartialName($Name)
}
else
{
Write-Verbose -Message 'DEBUG2' -Verbose
$assemblyInformation = [System.Reflection.Assembly]::Load($Name)
}

Expand All @@ -739,7 +738,6 @@ function Import-Assembly
}
catch
{
Write-Verbose ($_ | Out-String) -Verbose
$errorMessage = $script:localizedData.FailedToLoadAssembly -f $Name

New-InvalidOperationException -Message $errorMessage -ErrorRecord $_
Expand Down

0 comments on commit 7f14116

Please sign in to comment.