This file contains 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 EndpointConfig : AsA_Server, IConfigureThisEndpoint,IWantCustomInitialization | |
{ | |
public void Init() | |
{ | |
Configure.With() | |
.Log4Net() | |
.UsingContainer<SpringObjectBuilder>() | |
} |
This file contains 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 SSSBMessageForwarder : IWantToRunAtStartup | |
{ | |
readonly IBus _bus; | |
readonly ITransport _transport; | |
public SSSBMessageForwarder(IBus bus, ISSSBTransportFactory transportFactory) | |
{ | |
_bus = bus; | |
_transport = transportFactory.GetTransport(); |
This file contains 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
CREATE PROCEDURE [dbo].[SendNServiceBusMessage] | |
@TargetService NVARCHAR(200), | |
@MessageName NVARCHAR(200), | |
@MessageContent NVARCHAR(4000) | |
AS | |
BEGIN | |
-- Sending a Service Broker Message | |
DECLARE @InitDlgHandle UNIQUEIDENTIFIER; |
This file contains 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 NServiceBus.ObjectBuilder.Common.Config; | |
using NServiceBus.ObjectBuilder.Spring; | |
using Spring.Context.Support; | |
using NServiceBus; | |
namespace CoreOnly | |
{ | |
class Program | |
{ | |
static void Main(string[] args) |
This file contains 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.Linq.Expressions; | |
using NServiceBus; | |
using Rhino.Mocks; | |
using Rhino.Mocks.Interfaces; | |
using NSB = NServiceBus; | |
namespace NullReference.NServiceBus | |
{ | |
public static class BusTestExtensions |
This file contains 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 NHibernateMessageHandler:IHandleMessages<NHibernateMessage> | |
{ | |
readonly ISession session; | |
public NHibernateMessageHandler(ISession session) | |
{ | |
this.session = session; | |
} | |
public void Handle(NHibernateMessage message) |
This file contains 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 container = new Container(x => | |
{ | |
x.ForSingletonOf<ISessionFactory>().Use(ConfigureSessionFactory()); | |
x.For<ISession>().Use(ctx => ctx.GetInstance<ISessionFactory>().OpenSession()); | |
}); |
This file contains 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 Forwarder: IWantToRunAtStartup | |
{ | |
readonly IBus _bus; | |
readonly ITransport _transport; | |
public Forwarder(IBus bus, IYourOwnTransportFactory transportFactory) | |
{ | |
_bus = bus; | |
_transport = transportFactory.GetTransport(); |
This file contains 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 MySSSBTransportFactory : ISSBTransportFactory | |
{ | |
readonly string _connectionString; | |
readonly IMessageSerializer _messageSerializer; | |
public TaxberTransportFactory(string connectionString, IMessageSerializer messageSerializer) | |
{ | |
_connectionString = connectionString; | |
_messageSerializer = messageSerializer; | |
} |
This file contains 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
/// <summary> | |
/// The main interface for interactions with the databus | |
/// </summary> | |
public interface IDataBus | |
{ | |
/// <summary> | |
/// Gets a data item from the bus | |
/// </summary> | |
/// <param name="key"></param> | |
/// <returns></returns> |
OlderNewer