Skip to content

Instantly share code, notes, and snippets.


Matthew Abbott Antaris

Block or report user

Report or block Antaris

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Antaris / ServiceProviderJobFactory.cs
Created May 21, 2019
A Quartz.NET job factory using Microsoft.Extensions.DependencyInjection and scoped services
View ServiceProviderJobFactory.cs
using System;
using System.Collections.Generic;
using Microsoft.Extensions.DependencyInjection;
using Quartz;
using Quartz.Spi;
public class ServiceProviderJobFactory : IJobFactory
private readonly IServiceProvider _rootServiceProvider;

Keybase proof

I hereby claim:

To claim this, I am signing this object:

View User.cs
public class User
// If this property is NOT NULL in the database, should this be string, or string? If the former, should it be initialised to an empty string?
public string Username { get; set; }
View OMD-SeachExample.html
This file has been truncated, but you can view the full file.
<!DOCTYPE html>
<html lang="en" xmlns="">
<meta charset="utf-8" />
body { padding: 0; font-family: "Segoe UI", Helvetica, Arial, sans-serif }
header { margin-bottom: 20px; display: flex; align-items: center; }
View EventSubscription.cs
public class EventSubscription<TPayload> : IEventSubscription<TPayload>
private readonly WeakReference<NotificationDelegate<TPayload>> _notificationRef;
private readonly WeakReference<FilterDelegate<TPayload>> _filterRef;
/// <summary>
/// Initialises a new instance of <see cref="EventSubscriberBase{TEvent, TPayload}"/>
/// </summary>
/// <param name="token">The subscription token</param>
/// <param name="notification">The notification delegate</param>
View Program.cs
// Copyright (c) Fresh Egg Limited. All rights reserved
namespace Fx.Messaging.Distributed.Host
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Fx.DistributedServices;
View DyanamicRouter.cs
public class DynamicRouter : IRouter
private IRouter _router;
public DynamicRouter(IRouter router)
_router = router;
public Task RouteAsync(RouteContext context)
Antaris / Common.props
Last active May 17, 2017
Flexible package management with MSBuild
View Common.props
<ItemGroup Condition="'$(TargetFramework)'=='netstandard1.6'">
<PackageReference Include="NETStandard.Library" Version="1.6.1" />
<ItemGroup Condition="'$(TargetFramework)'=='netcoreapp1.1'">
<PackageReference Include="Microsoft.NETCore.App" Version="1.1.0" />
Antaris / MyContext.cs
Created Oct 14, 2016 — forked from divega/MyContext.cs
Simple builder class for creating TVPs that work in .NET Core 1.0
View MyContext.cs
using Microsoft.EntityFrameworkCore;
namespace TvpSampleApp
public class MyContext : DbContext
public DbSet<Person> People { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
Antaris / BlogDbContext.cs
Last active Oct 18, 2016
Early work on custom type conversions for Entity Framework
View BlogDbContext.cs
public class BlogDbContext : DbContext
public DbSet<BlogPost> Posts { get; set; }
You can’t perform that action at this time.