Consuming Code-First Application Bindings
We have seen that C# code-first bindings will be used at deployment time to generate the XML bindings to be imported in Microsoft BizTalk Server® for the targeted environment, see Be.Stateless.BizTalk.Dsl.Binding Rationale, but we have not seen how this could be achieved. The PowerShell module BizTalk.Deployment provides a variety of commands to consume these compiled assemblies containing the C# code-first bindings and do just that and more:
Convert-ApplicationBinding [-ApplicationBindingAssemblyFilePath] <string> [-AssemblyProbingFolderPath <string[]>] [-EnvironmentSettingOverridesTypeName <string>] [-Isolated] [-OutputFilePath] <string> [-TargetEnvironment] <string> [<CommonParameters>]
Expand-ApplicationBinding [-InputFilePath] <string> [[-OutputFilePath] <string>] [-Trim] [<CommonParameters>]
Get-ApplicationHosts [-ApplicationBindingAssemblyFilePath] <string> [-AssemblyProbingFolderPath <string[]>] [-EnvironmentSettingOverridesTypeName <string>] [-Isolated] [-TargetEnvironment] <string> [<CommonParameters>]
Initialize-ApplicationState [-ApplicationBindingAssemblyFilePath] <string> [-AssemblyProbingFolderPath <string[]>] [-EnvironmentSettingOverridesTypeName <string>] [-InitializationOption {None | Orchestrations | ReceiveLocations | SendPorts | All}] [-Isolated] [-TargetEnvironment] <string> [<CommonParameters>]
Install-ApplicationFileAdapterFolders [-ApplicationBindingAssemblyFilePath] <string> [-TargetEnvironment] <string> -User <string[]> [-AssemblyProbingFolderPath <string[]>] [-EnvironmentSettingOverridesTypeName <string>] [-Isolated] [<CommonParameters>]
Test-ApplicationBinding [-ApplicationBindingAssemblyFilePath] <string> [-TargetEnvironment] <string> [-AssemblyProbingFolderPath <string[]>] [-EnvironmentSettingOverridesTypeName <string>] [-Isolated] [<CommonParameters>]
Test-ApplicationState [-ApplicationBindingAssemblyFilePath] <string> [-TargetEnvironment] <string> [-AssemblyProbingFolderPath <string[]>] [-EnvironmentSettingOverridesTypeName <string>] [-Isolated] [<CommonParameters>]
Uninstall-ApplicationFileAdapterFolders [-ApplicationBindingAssemblyFilePath] <string> [-TargetEnvironment] <string> [-AssemblyProbingFolderPath <string[]>] [-EnvironmentSettingOverridesTypeName <string>] [-Isolated] [-Recurse] [<CommonParameters>]
Remark See the native
PowerShellhelp for a description of what these commands do.
Warning For the
Isolatedswitch to work,PowerShellremoting must be enabled; see how to enablePowerShellremoting locally.
These commands have been primarily created to support the deployment tasks that come with the PowerShell module BizTalk.Deployment. They are all, but the Expand-ApplicationBinding command, backed up by an implementation of the IApplicationBindingVisitor interface, provided either directly by Be.Stateless.BizTalk.Dsl.Binding assembly or by the PowerShell module BizTalk.Deployment itself, see Consuming Code-First Bindings.
-
Convert-ApplicationBindingnaturally relies on the BindingInfoBuilder visitor; -
Get-ApplicationHostsrelies on the BizTalkHostEnumerator visitor, which also implements theIEnumerable<string>interface; -
Initialize-ApplicationStaterelies on the BizTalkServiceStateInitializer visitor; -
Install-ApplicationFileAdapterFoldersrelies on the FileAdapterFolderInstaller visitor; -
Test-ApplicationBindingrelies on the ApplicationBindingValidator visitor; -
Test-ApplicationStaterelies on the BizTalkServiceStateValidator visitor; -
Uninstall-ApplicationFileAdapterFoldersrelies on the FileAdapterFolderUninstaller visitor.