Skip to content

Instantly share code, notes, and snippets.

View JakeGinnivan's full-sized avatar
:shipit:

Jake Ginnivan JakeGinnivan

:shipit:
View GitHub Profile
[TestFixture]
public class RecordTest
{
[Test]
public void DoTest()
{
var testing = Log4NetTestHelper.RecordLog(() =>
{
var log = LogManager.GetLogger(typeof (RecordTest));
log.Error("Testing!");
public interface IHttpCall
{
Task<HttpResponseMessage> Execute(HttpClient httpClient);
}
public interface IHttpWithResult<T> : IHttpCall
{
}
public interface IHttpCallExecutor
public class HttpExecutor : IHttpExecutor
{
private readonly HttpClient _restClient;
public EmbedApi(IConfig config, Func<Owned<ILifetimeScope>> lifetimeScope)
{
var scope = lifetimeScope().Value;
var httpClientHandler = new HttpClientHandler
{
Credentials = new NetworkCredential(config.Username, config.Password)
@JakeGinnivan
JakeGinnivan / GitHubFlowVersioning.md
Last active August 24, 2018 06:37
Versioning, CI/CD

I have been doing a heap of reading about semver and how you can include build meta-data and other things, but I am really struggling to find a way to fit SemVer and Continous Delivery together.

Currently I am the primary maintainer or a main contributor for for:
https://github.com/TestStack/White
https://github.com/JakeGinnivan/VSTOContrib
https://github.com/DbUp/DbUp
https://github.com/Code52/DownmarkerWPF
https://github.com/TestStack/ConventionTests

And quite a few other smaller projects (https://github.com/JakeGinnivan?tab=repositories)

public class ViewModelPropertiesImplementNotifyPropertyChangedAndAreInUIProject : IConvention<Types>
{
public void Execute(Types data, IConventionResultContext result)
{
var notifyPropertyChanged = typeof(INotifyPropertyChanged);
var viewModelType = typeof(ViewModelBase);
var viewModels = data.TypesToVerify.Where(viewModelType.IsAssignableFrom);
var allPropertyTypes = GetPropertyTypes(viewModels, new List<Type>()).ToArray();
var failingData = allPropertyTypes.Where(t => !notifyPropertyChanged.IsAssignableFrom(t));
function Get-Batchfile ($file) {
$cmd = "`"$file`" & set"
cmd /c $cmd | Foreach-Object {
$p, $v = $_.split('=')
Set-Item -path env:$p -value $v
}
}
function VsVars32()
{

Easy Semantic Versioning (SemVer.org) for projects using GitHub flow

public static class nHibernateExtensions
{
public static T Transaction<T>(this ISession session, Action<ISession, T> action)
{
// 3. Enters here
using (var tran = session.BeginTransaction()){
// 4. Calls into the lambda
return action(tran);
// 7. execution continues here
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Class="MainWindow" Title="WPF3D" Width="534"
Height="254">
<Grid>
Plugin works well, except the first element, I am getting a space inserted before the window, and also I can't add/remove the namespace so the formatting is screwed.
SyncCtx/IsThreadPool/ThreadId: System.Windows.Threading.DispatcherSynchronizationContext/False/8
SyncCtx/IsThreadPool/ThreadId: System.Windows.Threading.DispatcherSynchronizationContext/True/10