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
using System; | |
using System.Threading; | |
public class FunctionScheduler | |
{ | |
private int _runEveryMs; | |
private Action _actionToRun; | |
private Timer _timer = null; | |
private object _lock = new object(); |
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]$configFolder, | |
[Parameter(Mandatory=$true)] | |
[string]$configPattern, | |
[Parameter(Mandatory=$true)] | |
[string]$currentRoles | |
) | |
function Update-ConfigFile |
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]$url, | |
[Parameter(Mandatory=$true)] | |
[string]$target | |
) | |
function Fetch-WebsiteCredentials | |
{ | |
$file = "dev.creds.xml" |
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
## | |
## private functions | |
## | |
# | |
# If necessary, download a file and unzip it to the specified location | |
# | |
function downloadAndUnzipIfRequired | |
{ | |
Param( |
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( | |
$solrVersion = "6.6.2", | |
$installFolder = "c:\solr", | |
$solrPort = "8983", | |
$solrHost = "solr", | |
$solrSSL = $true, | |
$nssmVersion = "2.24", | |
$JREVersion = "1.8.0_151" | |
) |
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
using Microsoft.VisualStudio.TestTools.UnitTesting; | |
using Moq; | |
using Sitecore.FiftyOneDegrees.CloudDeviceDetection.Services; | |
using Sitecore.FiftyOneDegrees.CloudDeviceDetection.Settings; | |
using Sitecore.FiftyOneDegrees.CloudDeviceDetection.System.Wrappers; | |
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Web; |
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
using System; | |
namespace StronglyTypedPipelines | |
{ | |
public interface ILoggingPipeline | |
{ | |
void RaiseMessage(IPipelineStep sender, string message, object data); | |
} | |
public abstract class LoggingPipelineStep<INPUT, OUTPUT> : IPipelineStep<INPUT, OUTPUT> |
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
using System; | |
namespace StronglyTypedPipelines | |
{ | |
public abstract class BasePipelineStep<INPUT, OUTPUT> : IPipelineStep<INPUT, OUTPUT> | |
{ | |
public event Action<INPUT> OnInput; | |
public event Action<OUTPUT> OnOutput; | |
// note need for descendant types to implement this, not Process() |
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
using System.Collections.Generic; | |
namespace StronglyTypedPipelines | |
{ | |
public class LoopStep<INPUT,OUTPUT> : IPipelineStep<IEnumerable<INPUT>, IEnumerable<OUTPUT>> | |
{ | |
private IPipelineStep<INPUT, OUTPUT> _internalStep; | |
public LoopStep(IPipelineStep<INPUT, OUTPUT> internalStep) |
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
using System; | |
namespace StronglyTypedPipelines | |
{ | |
/// <summary> | |
/// A base interface required so that reflection code can create a Step from its type name, | |
/// without needing to understand its generic parameters first. | |
/// </summary> | |
public interface IPipelineStep |