This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static class EventStoreConnectionExtensions | |
{ | |
public static Task<EventStoreRxSubscription> SubscribeToAll(this EventStoreConnection connection, bool resolveLinkTos) | |
{ | |
return Task<EventStoreRxSubscription>.Factory.StartNew(() => { | |
var subject = new Subject<ResolvedEvent>(); | |
var subscriptionTask = connection.SubscribeToAll(resolveLinkTos, subject.OnNext, () => subject.OnError(new SubscriptionDroppedException())); | |
subscriptionTask.Wait(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class GetEventStoreEventDispatcher | |
{ | |
private readonly IEventBus _eventBus; | |
private readonly EventStoreConnection _connection; | |
private bool _stopRequested; | |
private EventStoreAllCatchUpSubscription _subscription; | |
private readonly IPersistGetEventStorePosition _positionRepository; | |
public GetEventStoreEventDispatcher(EventStoreConnection connection, IEventBus eventBus, IPersistGetEventStorePosition positionRepository) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SlightlyBetterButStillNotGreatDispatcher | |
{ | |
private readonly IEventStoreConnection _connection; | |
private readonly IPersistGetEventStorePosition _positionCheckpoint; | |
private readonly IPublisher _next; | |
private readonly Action<EventStoreCatchUpSubscription> _onLiveProcessingStarted; | |
private EventStoreAllCatchUpSubscription _subscription; | |
public SlightlyBetterButStillNotGreatDispatcher(IEventStoreConnection connection, IPersistGetEventStorePosition positionCheckpoint, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Test] | |
public void ConstructorSucceeeds() | |
{ | |
var id = new ConcertId(Guid.NewGuid()); | |
new ConstructorScenario() | |
.When(() => Concert.New(id)) | |
.Then(ConcertEvents.Planned(id)) | |
.Assert(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function Clean-SvnWorkingCopy { | |
Param( | |
[Parameter(Mandatory=$true, Position=0, HelpMessage="Path to the repository to clean")] | |
[string]$repositoryPath | |
) | |
Process { | |
Push-Location $repositoryPath | |
[xml]$svnChangelist = Exec { svn status --xml } | |
$entries = $svnChangelist.GetElementsByTagName("entry") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Net; | |
using EventStore.ClientAPI; | |
using EventStore.ClientAPI.Common.Log; | |
using EventStore.ClientAPI.SystemData; | |
namespace ConsoleApplication3 | |
{ | |
class Program | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
using System.IO.Ports; | |
using System.Reactive.Linq; | |
namespace ObservableSerialPort | |
{ | |
public class ObservableSerialPort : IObservable<string> | |
{ | |
private readonly string _portName; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Observable.FromEventPattern<MouseButtonEventHandler, MouseButtonEventArgs> | |
(h => JobsGrid.MouseDoubleClick += h, h => JobsGrid.MouseDoubleClick -= h) | |
.InvokeCommand(this, v => v.ViewModel.GoToJob); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Note that this will ONLY work currently (10 March 2014) with the `dev` branch of Event Store as that has commits which fix the .csproj files to use dylibs instead of shared objects. Instructions are incomplete and untested, but there will be a working, tested script forthcoming soon! | |
1. Build a 64 bit mono from source (I'm on 3.8, the GC is broken in everything since 3.0.12 though (and that needs patching) but I guess if you're on OS X you're not talking production here). Assuming this is going in /opt/mono | |
2. Clone and build V8. Should be a simple case of: | |
- `make dependencies` | |
- `make x64.release library=shared` | |
- Copy the dylibs to `src/EventStore/libs/` |