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 abstract class AggregateRoot : IAggregateRoot | |
{ | |
private const int DefaultVersion = 0; | |
private readonly Dictionary<Type, Action<IEvent>> handlers = new Dictionary<Type, Action<IEvent>>(); | |
private List<IEvent> _uncommitedChanges = new List<IEvent>(); | |
public Guid Id { get; protected set; } | |
public int Version { get; private set; } |
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 const int RECONNECT_TIMEOUT_MILLISEC = 5000; | |
private const int THREAD_KILL_TIMEOUT_MILLISEC = 5000; | |
private const int READ_PAGE_SIZE = 500; | |
private const int LIVE_QUEUE_SIZE_LIMIT = 10000; | |
private readonly IEventBus _eventBus; | |
private readonly EventStoreConnection _store; |
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 System.Text; | |
using System.Threading.Tasks; | |
using EventStore.ClientAPI; | |
using Microsoft.AspNet.SignalR; | |
using Microsoft.Owin.Hosting; | |
using Owin; | |
namespace EventStoreSignalR |
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
//Special thanks to Andrii Nakryiko and James Nugent | |
//for their help with this code. | |
namespace Infrastructure.EventStorage | |
{ | |
using System; | |
using System.Collections.Concurrent; | |
using System.Net; | |
using System.Text; | |
using System.Threading; | |
using EventStore.ClientAPI; |
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
I have a Variable defined in my TFS Build template | |
Name:TFSGenProductVersion | |
Type:String | |
Scope:Sequence | |
Default:"3.1.2" | |
I added this to the wixproj | |
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> | |
<DefineConstants>Debug;MyProductVersion=0.0.0.1</DefineConstants> |
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 ReactiveUI; | |
using System.Threading.Tasks; | |
using System.Windows.Input; | |
using TwitterFeedAPI; | |
namespace FeedManagement.WPF.Search | |
{ | |
public class SearchViewModel : ReactiveObject, ISearchViewModel | |
{ | |
public IScreen HostScreen { get; protected set; } |
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
<?xml version="1.0" encoding="utf-8" ?> | |
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
<CodeSnippet Format="1.0.0"> | |
<Header> | |
<Title>Rx ObservableAsPropertyHelper</Title> | |
<Shortcut>rxOAPH</Shortcut> | |
<Description>Code snippet for a ReactiveUI ObservableAsPropertyHelper</Description> | |
<SnippetTypes> | |
<SnippetType>Expansion</SnippetType> | |
</SnippetTypes> |
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 partial class App : Application | |
{ | |
protected override void OnStartup(StartupEventArgs e) | |
{ | |
base.OnStartup(e); | |
//ghetto bootstrap - IS THIS OK? | |
var searchView = new SearchView(); | |
searchView.ViewModel = new SearchViewModel(); | |
searchView.DataContext = searchView.ViewModel; |
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 StreamTrackedContentViewModel : ReactiveObject | |
{ | |
public StreamTrackedContentViewModel(Twitter twitterApi) | |
{ | |
Tweets = new ReactiveList<Tweet>(); | |
TweetViewModels = Tweets.CreateDerivedCollection(tweet => new TweetTileViewModel(tweet.CreatedAt, | |
tweet.UserPic, | |
tweet.UserName, | |
tweet.ScreenName, | |
tweet.Text)); |
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.Collections.Generic; | |
using System.Reactive; | |
using System.Reactive.Disposables; | |
using System.Reactive.Linq; | |
using System.Windows.Forms; | |
namespace RxStuff | |
{ | |
class Program | |
{ |
OlderNewer