Skip to content

Instantly share code, notes, and snippets.

View anavarro9731's full-sized avatar

Aaron Navarro anavarro9731

View GitHub Profile
@anavarro9731
anavarro9731 / gist:1851315
Created February 17, 2012 06:36
remove for circular buffer
/// <summary>
/// Removes an item from the collection. If the item removed occurs at or before the current position the current position is moved back by one.
/// </summary>
/// <param name="item"></param>
/// <returns></returns>
public bool Remove(T item)
{
if (Contains(item))
{
@anavarro9731
anavarro9731 / gist:1221414
Created September 16, 2011 07:07
eventstore example demonstrating transaction aborted error with ravenpersistence
using System.Transactions;
namespace EventStore.Example
{
using System;
internal static class MainProgram
{
private static readonly Guid StreamId = Guid.NewGuid(); // aggregate identifier