This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Get the machine.config file. | |
Configuration machineConfig = ConfigurationManager.OpenMachineConfiguration(); | |
// Get the machine.config file path. | |
ConfigurationFileMap configFile = new ConfigurationFileMap(machineConfig.FilePath); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<xsl:template match="/ns0:MessageTest"> | |
<xsl:message terminate="yes">Error: Mapping Terminated from XSL</xsl:message> | |
</xsl:template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public Task<object> InvokeOperationAsync(object instance, object[] inputs, object state) | |
{ | |
Message inputMessage = null; | |
Message outputMessage = null; | |
try | |
{ | |
if (inputs != null && inputs.Length == 1) | |
{ | |
inputMessage = inputs[0] as Message; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var client = new RedisCacheClient(); | |
// Write(Unique Typed Key, Value, Timespan | |
var success = client.Write(new NoMessagesAvailableCacheKey("Codit"), false, TimeSpan.FromMinutes(15)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var client = new RedisCacheClient(); | |
// Write(Unique Typed Key, Value, Timespan | |
var success = client.Write(new NoMessagesAvailableCacheKey("Codit"), true, TimeSpan.FromMinutes(15)); |