Skip to content

Instantly share code, notes, and snippets.

@kellabyte
kellabyte / EventAggregator.cs
Created August 21, 2011 22:56
Making a service bus independent messaging infrastructure
namespace Caliburn.Micro
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
/// <summary>
/// Enables loosely-coupled publication of and subscription to events.
/// </summary>
using System;
using System.Linq;
using System.Text;
using Disruptor;
using Elasticity.Domain;
using Elasticity.Events;
namespace Elasticity.Domain
{
@kellabyte
kellabyte / cassandra_test-01.cs
Created November 14, 2011 22:52
Cassandra Performance Test
using System;
using System.Diagnostics;
using System.Threading.Tasks;
using FluentCassandra;
using FluentCassandra.Types;
namespace CassandraTest1
{
class Program
{
@kellabyte
kellabyte / log.txt
Created November 26, 2011 23:45
MassTransit Log
DEBUG 06:43:02 SKIP:msmq-pgm://235.109.116.115:7784/gateway_control_subscriptions:47ab8be6-bcd1-4831-bb90-262eca8b4cf5\5515
ERROR 06:43:02 Exception converting message to type: AddPeerSubscription
System.Runtime.Serialization.SerializationException: Failed to deserialize the message ---> System.IO.IOException: I/O error occurred.
at System.Reflection.Emit.AssemblyBuilder.SaveManifestToDisk(RuntimeAssembly assembly, String strFileName, Int32 entryPoint, Int32 fileKind, Int32 portableExecutableKind, Int32 ImageFileMachine)
at System.Reflection.Emit.AssemblyBuilder.SaveNoLock(String assemblyFileName, PortableExecutableKinds portableExecutableKind, ImageFileMachine imageFileMachine)
at System.Reflection.Emit.AssemblyBuilder.Save(String assemblyFileName, PortableExecutableKinds portableExecutableKind, ImageFileMachine imageFileMachine)
at Magnum.Reflection.InterfaceImplementationBuilder.<>c__DisplayClass2.<GetProxyFor>b__0() in d:\Builds\MassTransit-Magnum\src\Magnum\Reflection\InterfaceImplementationB
@kellabyte
kellabyte / masstransitlog-02.txt
Created November 27, 2011 01:37
MassTransit Log
DEBUG 08:27:07 AddPeerSubscription: MyService.Contract.Commands.ChangeCommand, MyService.Contract, ff465696-9dec-44e2-8b1d-9fa701510708
DEBUG 08:27:07 PeerSubscriptionAdded: MyService.Contract.Commands.ChangeCommand, MyService.Contract, msmq://mypc/service?tx=false 6ee1ac34-2c8c-4100-a111-9fa701510a32
DEBUG 08:27:07 Adding subscription for ChangeSessionClassificationCommand on msmq://mypc/gateway?tx=false to msmq://mypc/service?tx=false
INFO 08:27:07 Added: MyService.Contract.Commands.ChangeCommand, MyService.Contract => msmq://mypc/service?tx=false, 6ee1ac34-2c8c-4100-a111-9fa701510a32
<?xml version="1.0" encoding="utf-8"?>
<statuses type="array">
<status>
<created_at>Thu Sep 01 22:19:10 +0000 2011</created_at>
<id>109389864092442624</id>
<text>Login issue on dev.twitter.com is now fixed.</text>
<source>web</source>
<user>
<id>6253282</id>
<name>Twitter API</name>
<?xml version="1.0" encoding="utf-8"?>
<statuses type="array">
<status>
<created_at>Thu Sep 01 22:19:10 +0000 2011</created_at>
<id>109389864092442624</id>
<text>Login issue on dev.twitter.com is now fixed.</text>
<source>web</source>
<user href="http://api.twitter.com/1/users/show.xml?screen_name=TwitterAPI">
<id>6253282</id>
<name>Twitter API</name>
<?xml version='1.0' encoding='UTF-8'?>
<feed xmlns="http://www.w3.org/2005/Atom"
xmlns:as="http://atomserver.org/namespaces/1.0/"
xmlns:os="http://a9.com/-/spec/opensearchrss/1.1/">
<os:totalResults>65801</os:totalResults>
<os:startIndex>0</os:startIndex>
<os:itemsPerPage>2</os:itemsPerPage>
<as:endIndex>153</as:endIndex>
<link href="/myserver/v1/widgets/acme?start-index=153&amp;max-results=2" rel="next" />
<link href="/myserver/v1/widgets/acme?start-index=0&amp;max-results=2" rel="self" />
public TViewModel ViewModel
{
get
{
TViewModel viewModel;
bool wasCreated;
bool designMode = DetectDesignMode();
if (designMode)
{
public TViewModel ViewModel
{
get
{
TViewModel viewModel;
bool designMode = DetectDesignMode();
if (designMode)
{
// At design time instantiate design time version.