Skip to content

Instantly share code, notes, and snippets.

View circleupx's full-sized avatar

Yunier circleupx

  • South Florida
  • 12:54 (UTC -04:00)
View GitHub Profile
@circleupx
circleupx / extensible.cs
Created June 18, 2020 01:58
Extensible Object Pattern
public class BaseObject : IExtensibleObject<BaseObject>
{
private DateTime _startDate;
private ExtensionCollection<BaseObject> _extensions;
public DateTime StartDate
{
get { return _startDate; }
set { _startDate = value; }
}
@circleupx
circleupx / DeleteQueryWithGrammar.cs
Created August 24, 2020 13:28 — forked from ScottLilly/DeleteQueryWithGrammar.cs
Source code for my "How to build a fluent interface in C#" blog post.
using System.Collections.Generic;
using BuildAFluentInterface.Interfaces;
namespace BuildAFluentInterface
{
public class DeleteQueryWithGrammar : ICanAddCondition, ICanAddWhereValue, ICanAddWhereOrRun
{
private readonly string _tableName;
private readonly List<WhereCondition> _whereConditions = new List<WhereCondition>();
@circleupx
circleupx / jsonapi_oas.yml
Created August 29, 2020 16:59 — forked from naesean/jsonapi_oas.yml
OpenAPI 3.0 schemas that comply with the JSON:API 1.0 specification
JSONAPIObject:
description: Includes the current JSON:API version for this specification as well as optional meta information
type: object
required:
- version
properties:
version:
type: string
default: '1.0'
example: '1.0'
@circleupx
circleupx / AsyncRunner.cs
Created May 28, 2021 17:19 — forked from janv8000/AsyncRunner.cs
Start background tasks from MVC actions using Autofac
public interface IAsyncRunner
{
void Run<T>(Action<T> action);
}
public class AsyncRunner : IAsyncRunner
{
public ILifetimeScope LifetimeScope { get; set; }
public AsyncRunner(ILifetimeScope lifetimeScope)
@circleupx
circleupx / launch.json
Last active October 31, 2021 15:07
vscode dotnet launch configurations
{
"version": "0.2.0",
"compounds": [
{
"name": "Start Debugging in Chrome",
"configurations": [
"Launch Chrome",
".NET Debugger"
]
}