public void Should_be_able_to_register_and_resolve_transient_open_generic_components() { var container = new UnityComponentContainer(new UnityContainer()); RegisterTransientGeneric(container); ResolveTransientGeneric(container); }
public void Should_be_able_to_register_and_resolve_an_open_generic_singleton() { var container = new UnityComponentContainer(new UnityContainer()); RegisterSingletonGeneric(container); ResolveSingletonGeneric(container); }
public void Should_be_able_to_register_and_resolve_multiple_transient_components() { var container = new UnityComponentContainer(new UnityContainer()); RegisterMultipleTransient(container); ResolveMultipleTransient(container); }
public void Should_be_able_to_register_and_resolve_a_multiple_singleton() { var container = new UnityComponentContainer(new UnityContainer()); RegisterMultipleSingleton(container); ResolveMultipleSingleton(container); }
public void Should_be_able_resolve_all_instances() { var container = new UnityComponentContainer(new UnityContainer()); RegisterCollection(container); ResolveCollection(container); }
public void Start() { var container = new UnityComponentContainer(new UnityContainer()); ServiceBus.Register(container); _bus = ServiceBus.Create(container).Start(); }
public void Start() { var container = new UnityComponentContainer(new UnityContainer()); container.Register <IAzureStorageConfiguration, DefaultAzureStorageConfiguration>(); container.RegisterServiceBus(); _bus = container.Resolve <IServiceBus>().Start(); }
private static void Main(string[] args) { var container = new UnityComponentContainer(new UnityContainer()); ServiceBus.Register(container); using (var bus = ServiceBus.Create(container).Start()) { string userName; while (!string.IsNullOrEmpty(userName = Console.ReadLine())) { bus.Send(new RegisterMemberCommand { UserName = userName }); } } }
private static void Main(string[] args) { var container = new UnityComponentContainer(new UnityContainer()); container.Register <IAzureStorageConfiguration, DefaultAzureStorageConfiguration>(); container.RegisterServiceBus(); using (var bus = container.Resolve <IServiceBus>().Start()) { string userName; while (!string.IsNullOrEmpty(userName = Console.ReadLine())) { bus.Send(new RegisterMemberCommand { UserName = userName }); } } }