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
} | |
} | |
} | |
} | |
break; | |
} | |
} | |
} | |
} |
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
Dictionary<string, bool> usedGuids = new Dictionary<string, bool>(); | |
private string CreateUniqueGuid() | |
{ | |
string newGuid = Guid.NewGuid().ToString(); | |
if (usedGuids.ContainsKey(newGuid)) | |
{ | |
throw new Exception(); | |
} |
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
foreach(var derivedMessageType in GetAllMessageTypes().Where(t => typeof(IBaseMessage).IsAssignableFrom(t)) | |
{ | |
bus.GetType().GetMethod("Subscribe").MakeGenericMethod(derivedMessageType).Invoke(bus, new object[0]); | |
} |
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" ?> | |
<configuration> | |
<configSections> | |
<section name="MsmqTransportConfig" type="NServiceBus.Config.MsmqTransportConfig, NServiceBus.Core" /> | |
<section name="UnicastBusConfig" type="NServiceBus.Config.UnicastBusConfig, NServiceBus.Core" /> | |
</configSections> | |
<MsmqTransportConfig InputQueue="someClient" | |
ErrorQueue="error" | |
NumberOfWorkerThreads="1" |
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
var bus = Configure.With() | |
.DefaultBuilder() | |
.XmlSerializer() | |
.MsmqTransport().IsTransactional(false) | |
.UnicastBus().LoadMessageHandlers() | |
.CreateBus() | |
.Start(); |
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 EndpointConfiguration : IConfigureThisEndpoint, | |
IWantCustomLogging, | |
IWantCustomInitialization | |
{ | |
public void Init() | |
{ | |
Configure.With() | |
.DefaultBuilder() | |
.XmlSerializer() | |
.MsmqTransport() |
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 EndpointConfiguration : IConfigureThisEndpoint, | |
AsA_Server, | |
IWantCustomInitialization, | |
IWantToRunAtStartup | |
{ | |
readonly IWindsorContainer container; | |
public EndpointConfiguration() | |
{ | |
container = new WindsorContainerDecorator() |
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 interface ICommand : IMessage {} | |
public interface IEvent : IMessage {} | |
public interface IRequest : IMessage {} | |
public interface IReply : IMessage {} |
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 readonly Regex TagsRegex = new Regex(@"(?:(?<=\s)|^)#(\w*[A-Za-z_]+\w*)"); | |
static readonly Regex MentionsRegex = new Regex(@"(?:(?<=\s)|^)\@(\w*[A-Za-z_]+\w*)"); |
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
var adapter = new MyContainerAdapter(favoriteContainer); | |
Configure.With(adapter) | |
.Transport(t => t.UseMsmq("some_input_queue")) | |
.Serialization(s => s.UseJsonSerializer()) | |
.Sagas(s => s.StoreInSqlServer(connectionstring, "saga_table", "saga_index_table")) | |
.Subscriptions(s => s.StoreInSqlServer(connectionstring, "subscriptions")) | |
.SpecifyOrderOfHandlers(h => h.First<SomeType>().Then<AnotherType>()) | |
.Logging(l => l.Log4Net()) | |
.DetermineEndpoints(d => d.FromRebusMappingsSection()) |
OlderNewer