Skip to content

Instantly share code, notes, and snippets.

View pvandenheede's full-sized avatar
🎯
Focusing

Pieter Vandenheede pvandenheede

🎯
Focusing
View GitHub Profile
@pvandenheede
pvandenheede / winscp-5.13.1-install-biztalk2016-cu5.ps1
Created February 14, 2019 00:15
BizTalk 2016 CU5 - WinSCP v5.13.1 Powershell installation script (courtesy of Thomas Canter, edited by me)
Param([Parameter(Mandatory=$true)][string]$downloadNoGetTo)
$Continue = $true
$downloadNoGetToExists = Test-Path $downloadNoGetTo
if (-not $downloadNoGetToExists)
{
New-Item -Path $downloadNoGetTo -ItemType "Directory"
}
if (-not $downloadNoGetToExists)
{
$Continue = $false
// Get the machine.config file.
Configuration machineConfig = ConfigurationManager.OpenMachineConfiguration();
// Get the machine.config file path.
ConfigurationFileMap configFile = new ConfigurationFileMap(machineConfig.FilePath);
// Map the application configuration file to the machine configuration file.
Configuration config = ConfigurationManager.OpenMappedMachineConfiguration(configFile);
ConfigurationSectionGroup svcModel = config.SectionGroups.Get("system.serviceModel");
ExtensionsSection extensions = (ExtensionsSection) svcModel.Sections.Get("extensions");
ExtensionElement e = new ExtensionElement("MyName", "MyType, MyNamespace.MyType, Version=1.0.0.0, Culture=neutral, PublicKeyToken=4275f802b89cdd22");
extensions.BehaviorExtensions.Add(e);
extensions.SectionInformation.ForceSave = true;
config.Save(ConfigurationSaveMode.Full);
// Map the application configuration file to the machine configuration file.
Configuration config = ConfigurationManager.OpenMappedMachineConfiguration(configFile);
ConfigurationSectionGroup svcModel = config.SectionGroups.Get("system.serviceModel");
ExtensionsSection extensions = (ExtensionsSection) svcModel.Sections.Get("extensions");
// Get the machine.config file.
Configuration machineConfig = ConfigurationManager.OpenMachineConfiguration();
// Get the machine.config file path.
ConfigurationFileMap configFile = new ConfigurationFileMap(machineConfig.FilePath);
<xsl:template match="/ns0:MessageTest">
<xsl:message terminate="yes">Error: Mapping Terminated from XSL</xsl:message>
</xsl:template>
public Task<object> InvokeOperationAsync(object instance, object[] inputs, object state)
{
Message inputMessage = null;
Message outputMessage = null;
try
{
if (inputs != null &amp;&amp; inputs.Length == 1)
{
inputMessage = inputs[0] as Message;
var client = new RedisCacheClient();
// Write(Unique Typed Key, Value, Timespan
var success = client.Write(new NoMessagesAvailableCacheKey("Codit"), false, TimeSpan.FromMinutes(15));
var client = new RedisCacheClient();
// Write(Unique Typed Key, Value, Timespan
var success = client.Write(new NoMessagesAvailableCacheKey("Codit"), true, TimeSpan.FromMinutes(15));