This file contains hidden or 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
namespace ServiceBus.Extensions.Bindings.MessageActions; | |
public class MessageActionsExtended | |
{ | |
private const string RETRY_COUNT = "X-RetryCount"; | |
private readonly ServiceBusMessageActions _messageActions; | |
private readonly ServiceBusSender _sender; | |
// Summary: |
This file contains hidden or 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
using System.Collections.Concurrent; | |
namespace ServiceBus.Extensions.Bindings.MessageActions; | |
/// <summary> | |
/// Runs on every request and passes the function context (e.g. Http request and host configuration) to a value provider. | |
/// </summary> | |
public class MessageActionsExtendedBinding : IBinding | |
{ | |
private static ConcurrentDictionary<string, string> _functionNameWithQueueOrTopicNameCache = new ConcurrentDictionary<string, string>(); |
This file contains hidden or 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
// This is all pseudo code, never tested, just to give a quick idea of a delegate | |
// Just like you use the "class" keyword to define the characteristic of an object, you can use | |
// "delegate" to define the characteristic of a method. | |
public delegate void PerformDatabaseAction(SqlConnection sqlConn); | |
public static class DatabaseHelpers | |
{ | |
public static void DoDatabaseAction(PerformDatabaseAction theDbAction) | |
{ |
This file contains hidden or 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
using System.Collections.Generic; | |
using System.Linq; | |
using System; | |
public static class Program | |
{ | |
public static void Main() | |
{ | |
var dogs = new List<Dog>(); | |
dogs.Add(new Dalmatier()); |
This file contains hidden or 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
Function Convert-ToPackageReference | |
{ | |
Param ( [Parameter( Mandatory, ValueFromPipeline )][String] $inputUri, | |
[String] $stylesheetUri = "https://gist.githubusercontent.com/a4099181/074a6c3dd524ea0d343382137492399c/raw/e2cd1bc88671bb1435569ba9ab1835994aa91725/Convert-ToPackageReference.xsl", | |
[String] $resultsFile = [System.IO.Path]::GetTempFileName() ) | |
Process { | |
$xslt = New-Object System.Xml.Xsl.XslCompiledTransform | |
$xslt.Load( $stylesheetUri ) | |
$xslt.Transform( $inputUri, $resultsFile ) |
This file contains hidden or 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
<html> | |
<head> | |
<script type="text/javascript"> | |
// stolen from: http://stackoverflow.com/questions/11823784/redirection-to-a-specific-web-page-based-on-url-parameter-using-javascript | |
// http://minwinpc/RedirectUsingQueryParameter.html?selection=a | |
function getQueryStringArray(){ | |
var assoc=[]; | |
var items = window.location.search.substring(1).split('&'); | |
for(var j = 0; j < items.length; j++) { |
This file contains hidden or 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
if(self.Revision == 0) | |
{ | |
// without history, we can't do anything | |
logger.Log("There is not history for this task, quit."); | |
return null; | |
} | |
var treatStates = new[] {"In Progress", "Review"}; | |
var stateKey = "System.State"; | |
var currentState = (string)self.Fields[stateKey].Value; |
This file contains hidden or 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
<rule name="AutoOpen" appliesTo="Task"> | |
<!-- Update Work Item to Committed if a task became "active" --> | |
<![CDATA[ | |
if (new[] {"In Progress", "To Do"}.Contains((string)self["System.State"])) | |
{ | |
if(self.HasParent() && (string)self.Parent["System.State"] != "Committed") | |
{ | |
self.Parent.TransitionToState("Committed", "Auto Activated"); | |
} | |
} |
This file contains hidden or 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
<?xml version="1.0" encoding="utf-8"?> | |
<AggregatorConfiguration> | |
<!-- Configure TFS Aggregator behavior. (Once, Optional) | |
- **debug**: turns on debugging options (Optional, default: False) | |
--> | |
<runtime debug="false"> | |
<!-- | |
TBD | |
--> |