Skip to content

Instantly share code, notes, and snippets.

View CoditCompany's full-sized avatar
👋
You can find us on @CoditEU

Codit CoditCompany

👋
You can find us on @CoditEU
View GitHub Profile
public static class StaticProps
{
private static ConcurrentDictionary<string, List<BtsContextProperty>> propDictionary = new ConcurrentDictionary<string, List<BtsContextProperty>>();
public static void Add(string correlationID, BtsContextProperty property)
{
if (!propDictionary.ContainsKey(correlationID))
{
propDictionary.AddOrUpdate(correlationID, new List<BtsContextProperty>(), (key, existingVal) =>
{
'use strict'
var util = require('util');
var Protocol = require('azure-iot-device-http').Http;
var Client = require('azure-iot-device').Client;
var ConnectionString = require('azure-iot-device').ConnectionString;
var Message = require('azure-iot-device').Message;
var deviceId = 'test-0d544dd0-3eaa-11e6-8205-6d1f96ea4efc';
var deviceKey = 'xxx';
var data = {
"timestamp": new Date().toUTCString(),
var dataSimulator = require('./index.js'),
util = require('util'),
should = require('should');
function getContextObject() {
return {
res: null,
log: function() {
console.log(util.format(arguments));
},
done: null
public static int GetNumberOfSendPortsInSendPortGroup(string spgName)
{
intnumberOfSendPorts = 0;
BtsCatalogExplorer root = newBtsCatalogExplorer();
root.ConnectionString = "Integrated Security=SSPI;database=BizTalkMgmtDb;server=.";
foreach (SendPortGroup sendPortGroup inroot.SendPortGroups)
{
if (sendPortGroup.Name == spgName)
public bool LogicalExistence(bool val)
{
return val;
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel.Description;
using System.ServiceModel.Security;
namespace Axon.Biztalk.WCF.Extensions
{
public class ImpersonateNtlmCredentialsBehaviour : IEndpointBehavior
function GetBizTalkGroupSettinginfo
{
$script:BizTalkGroupMgmtDbServerName = get-wmiobjectMSBTS_GroupSetting -namespaceroot\MicrosoftBizTalkServer | select-object-expandMgmtDbServerName
$script:BizTalkGroupMgmtDbName = get-wmiobjectMSBTS_GroupSetting -namespaceroot\MicrosoftBizTalkServer | select-object-expandMgmtDbName
$script:BamDBName = get-wmiobjectMSBTS_GroupSetting -namespaceroot\MicrosoftBizTalkServer | select-object-expandBamDBName
$script:BamDBServerName = get-wmiobjectMSBTS_GroupSetting -namespaceroot\MicrosoftBizTalkServer | select-object-expandBamDBServerName
$script:BizTalkAdministratorGroup = get-wmiobjectMSBTS_GroupSetting -namespaceroot\MicrosoftBizTalkServer | select-object-expandBizTalkAdministratorGroup
$script:BizTalkOperatorGroup = get-wmiobjectMSBTS_GroupSetting -namespaceroot\MicrosoftBizTalkServer | select-object-expandBizTalkOperatorGroup
$script:ConfigurationCacheRefreshInterval = get-wmiobjectMSBTS_GroupSetting -namespaceroot\MicrosoftBizTalkServer
$servers= (&quot;BizTalk2010n1&quot;, &quot;BizTalk2010n2&quot;)
#This function checks the status of the host instances on a BizTalk server ($Server).
function checkhostinstancestatusstarted ($server)
{
#gets all host instances on the server. Isolated (hosttype = 2) or disabled hosts are excluded .
$hostinstances= get-wmiobjectMSBTS_HostInstance -namespace&#039;root\MicrosoftBizTalkServer&#039; | where {$_.runningserver -match $server -AND $_.hosttype -ne &quot;2&quot; -and $_.IsDisabled -ne &quot;True&quot;}
write-host&quot;Checking the state of all host instances on the server $server`:&quot;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel.Configuration;
using System.Configuration;
namespace Axon.Biztalk.WCF.Extensions
{
public class ImpersonateNtlmCredentialsBehaviourElement : BehaviorExtensionElement
@CoditCompany
CoditCompany / OrderBatch.json
Created February 20, 2017 16:39
Blog Sample Files
{
"OrderBatch": {
"OrderBatchId": "BATCH001",
"OrderDate": "2017-02-03",
"Customer": "Codit",
"Orders": [
{
"OrderId": "1",
"Product": "Consultancy",
"Quantity": "16",