I hereby claim:
- I am jermdavis on github.
- I am jermdavis (https://keybase.io/jermdavis) on keybase.
- I have a public key ASBCmmvpawRgYxXAmGg-piQyK4YuE-VmHghwBDPTQGRWuAo
To claim this, I am signing this object:
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; |
using System; | |
namespace StronglyTypedPipelines | |
{ | |
public interface ILoggingPipeline | |
{ | |
void RaiseMessage(IPipelineStep sender, string message, object data); | |
} | |
public abstract class LoggingPipelineStep<INPUT, OUTPUT> : IPipelineStep<INPUT, OUTPUT> |
param( | |
[Parameter(Mandatory=$true)] | |
[string]$configFolder, | |
[Parameter(Mandatory=$true)] | |
[string]$configPattern, | |
[Parameter(Mandatory=$true)] | |
[string]$currentRoles | |
) | |
function Update-ConfigFile |
using System; | |
using System.Threading; | |
public class FunctionScheduler | |
{ | |
private int _runEveryMs; | |
private Action _actionToRun; | |
private Timer _timer = null; | |
private object _lock = new object(); |
I hereby claim:
To claim this, I am signing this object:
public struct Either<SUCCESS, FAILURE> | |
{ | |
private readonly bool _isSuccess; | |
private readonly SUCCESS _success; | |
private readonly FAILURE _failure; | |
public bool IsSuccess => _isSuccess; | |
public bool IsFailure => !IsSuccess; | |
public SUCCESS SuccessValue => _success; |
using System; | |
namespace LoggingPipeline | |
{ | |
public interface IPipelineStep<INPUT, OUTPUT> | |
{ | |
OUTPUT Process(INPUT input); | |
} | |
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() |
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 |
async Task Main() | |
{ | |
var pipeline = new ExampleAsyncPipeline(); | |
var uri = new Uri("https://news.bbc.co.uk/"); | |
var tempFile = await pipeline.ProcessAsync(uri); | |
Console.WriteLine($"{uri} saved to {tempFile}"); | |
} |