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
| ProcessLineInFileMessage[] messages = ConvertFileToMessages(file); | |
| Bus.Send(messages); // Sends all logical messages in 1 transport message |
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
| ProcessLineInFileMessage[] messages = ConvertFileToMessages(file); | |
| foreach (var message in messages) | |
| Bus.Send(message); // Send one logical message at a time |
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
| if (db.EmailIsUnique(member.Email)) | |
| db.Save(member); |
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 ClientRoleHandler : IConfigureRole<AsA_Client> | |
| { | |
| public ConfigUnicastBus ConfigureRole(IConfigureThisEndpoint specifier) | |
| { | |
| if (!Configure.Instance.Configurer.HasComponent<ISendMessages>()) | |
| Configure.Instance.MsmqTransport(); | |
| return Configure.Instance | |
| .PurgeOnStartup(true) | |
| .IsTransactional(false) |
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 ServerRoleHandler : IConfigureRole<AsA_Server> | |
| { | |
| public ConfigUnicastBus ConfigureRole(IConfigureThisEndpoint specifier) | |
| { | |
| if (!Configure.Instance.Configurer.HasComponent<ISendMessages>()) | |
| Configure.Instance.MsmqTransport(); | |
| return Configure.Instance | |
| .Sagas() | |
| .IsTransactional(true) |
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 TestClassBaseWithInitialize | |
| { | |
| private IContainer _container; | |
| [SetUp] | |
| public void SetUp() | |
| { | |
| _container = Root.BuildContainer(); | |
| } |
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 TestClassBase | |
| { | |
| private readonly IContainer _container | |
| = Root.Container.GetNestedContainer(); | |
| protected T GetInstance<T>() | |
| { | |
| return _container.GetInstance<T>(); | |
| } |
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 EndpointConfig : | |
| IConfigureThisEndpoint, | |
| AsA_Server | |
| { | |
| } |
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 ProductionProfileHandler : IHandleProfile<Production>, IWantTheEndpointConfig | |
| { | |
| void IHandleProfile.ProfileActivated() | |
| { | |
| Configure.Instance.RavenPersistence(); | |
| if (!Configure.Instance.Configurer.HasComponent<ISagaPersister>()) | |
| Configure.Instance.RavenSagaPersister(); | |
| if (!Configure.Instance.Configurer.HasComponent<IManageMessageFailures>()) |
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 RavenProductionPersistenceSetup : IHandleProfile<Production> | |
| { | |
| void IHandleProfile.ProfileActivated() | |
| { | |
| Configure.Instance | |
| .RavenPersistence("MyProductionConnectionString"); | |
| } | |
| } |