Skip to content

Instantly share code, notes, and snippets.

View jimitndiaye's full-sized avatar

Jimit Ndiaye jimitndiaye

View GitHub Profile
@jimitndiaye
jimitndiaye / EventMessage.cs
Created July 15, 2011 10:25
Generic EventMessage
/// <summary>
/// Wraps an <see cref = "IEvent">event</see>
/// to be transportable by NServiceBus.
/// </summary>
[Serializable]
[DataContract(Namespace = MessageNamespace)]
public class EventMessage<TEvent> : EventMessage, IEventMessage<TEvent> where TEvent : class
{
public EventMessage(IPublishedEvent<TEvent> @event) : base(@event)
{
@jimitndiaye
jimitndiaye / ConcurrentLinkedList.cs
Last active January 12, 2023 04:52
ConcurrentLinkedList<T>
#pragma warning disable 420
namespace System.Collections.Concurrent
{
using Azure.Framework;
using Diagnostics;
using Diagnostics.Contracts;
using Generic;
using Runtime.InteropServices;
using Runtime.Serialization;
@jimitndiaye
jimitndiaye / explorer.model.ts
Last active April 16, 2021 14:24
RXJS, @ngrx/store - Memoizing a tree search
import { Map, Record, List } from 'immutable';
export interface FolderTree {
id: string;
name: string;
subFolders: FolderTree[];
dialogs: DialogSummary[];
}
export interface DialogSummary {
id: string;
@jimitndiaye
jimitndiaye / context.ts
Created December 14, 2016 10:45
Angular2 directives supporting nested drag and drop
import { Injectable } from '@angular/core';
@Injectable()
export class DndContext {
dropEffect = 'none';
isDragging = false;
itemType = undefined;
dragData: any = undefined;
// stopDragOver= new Map<string, () => void>();
stopDragOver: () => void = undefined;