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 mock() | |
{ | |
Func<int,int> mocked = MockRepository.GenerateMock<Func<int, int>>(); | |
mocked.Expect(x => x(27)).Return(47); | |
int result = mocked(27); | |
mocked.VerifyAllExpectations(); |
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
ObjectFactory.Configure(x => | |
{ | |
x.AddRegistry(new ServerRegistry()); | |
}); | |
public class ServerRegistry : MassTransitRegistryBase { | |
public ServerRegistry() | |
{ | |
RegisterControlBus("msmq://localhost/test_server_control", x => { }); |
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
// message sender coder | |
IServiceBus bus = ObjectFactory.GetInstance<IServiceBus>(); | |
var message = new MyCommand { Text = "How's it going?" }; | |
ObjectFactory.GetInstance<IEndpointFactory>().GetEndpoint("msmq://localhost/test_server").Send(message, x => x.SendResponseTo(bus)); | |
/// - snip |
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
internal class Program | |
{ | |
private static void Main(string[] args) | |
{ | |
RunConfiguration configuration = RunnerConfigurator.New(x => | |
{ | |
x.SetServiceName("CalebMailService"); | |
x.SetDisplayName("Caleb's Mail Service"); | |
x.SetDescription("Give you some sexy mail service"); |
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
[core] | |
autoCRLF = false | |
editor = c:/bin/git/npp.cmd | |
[diff] | |
tool = kd3 | |
[merge] | |
tool = kd3 | |
[difftool "kd3"] | |
cmd = c:/bin/git/kdiff3.cmd \"$LOCAL\" \"$REMOTE\" | |
[difftool] |
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 SimpleExample | |
{ | |
public void SomeMethod<T>(T arg) | |
{ | |
DoSomethingWith(arg); | |
} | |
} |
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 CustomerAccount : | |
Actor | |
{ | |
string _name; | |
public void Handle(Message<UpdateName> msg) | |
{ | |
_name = msg.Name; | |
} | |
} |
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.Linq; | |
using System.Text; | |
using MassTransit; | |
using MassTransitExperimentShared; | |
using System.Threading; | |
namespace MassTransitConsumer | |
{ |
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
------------------------------------------------------------------------------------------------------------------------------------------- | |
Trace URI: msmq://localhost/mt_subscriptions 15 messages | |
------------------------------------------------------------------------------------------------------------------------------------------- | |
--------------------------------------------------------------------------------------------------------------------------------------- | |
Received: c940f977-ff3f-4195-99a5-9f110121ddd9 2011-06-29 05:35:20.614 | |
--------------------------------------------------------------------------------------------------------------------------------------- | |
Message Id: ad32c234-567b-4691-9f2f-314e31498c8a\1067975 | |
Source Address: msmq://localhost/mt_subscriptions?tx=false | |
Input Address: msmq: |
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 MyActor : | |
Actor | |
{ | |
public MyActor(Inbox inbox) | |
{ | |
inbox.Receive<InitMyActor>(initMsg => | |
{ | |
var myActorScopeValue = initMsg.Scope; | |
inbox.Loop(loop => |
OlderNewer