public static void Register(Type type) { var blend = Blend.From(type); Recipe.AssertValid(blend, type); invokers.Add(type, Bind(blend.ToString())); }
public void Blend_from_worker_with_both_methods_attributed() { Blend blend = Blend.From(typeof(WorkerWithInterleave)); Assert.That(blend.Flavors, Contains.Item(Activation.StatelessWorker)); Assert.That(blend.Flavors, Contains.Item(Concurrency.Default)); Assert.That(blend.Flavors, Contains.Item(Placement.Default)); Assert.That(blend.Flavors, Contains.Item(Delivery.Default)); Assert.That(blend.Flavors, Contains.Item(Interleave.Both)); }
public void Blend_from_unordered_stateless_worker() { Blend blend = Blend.From(typeof(UnorderedStatelessWorker)); Assert.That(blend.Flavors, Contains.Item(Activation.StatelessWorker)); Assert.That(blend.Flavors, Contains.Item(Concurrency.Default)); Assert.That(blend.Flavors, Contains.Item(Placement.Default)); Assert.That(blend.Flavors, Contains.Item(Delivery.Unordered)); Assert.That(blend.Flavors, Contains.Item(Interleave.Default)); }
public void Blend_from_singleton_with_tell_method_attributed() { Blend blend = Blend.From(typeof(TellInterleave)); Assert.That(blend.Flavors, Contains.Item(Activation.Singleton)); Assert.That(blend.Flavors, Contains.Item(Concurrency.Default)); Assert.That(blend.Flavors, Contains.Item(Placement.Default)); Assert.That(blend.Flavors, Contains.Item(Delivery.Default)); Assert.That(blend.Flavors, Contains.Item(Interleave.Tell)); }
public void Blend_from_non_attributed_type() { Blend blend = Blend.From(typeof(RegularSingleton)); Assert.That(blend.Flavors, Contains.Item(Activation.Singleton)); Assert.That(blend.Flavors, Contains.Item(Concurrency.Default)); Assert.That(blend.Flavors, Contains.Item(Placement.Default)); Assert.That(blend.Flavors, Contains.Item(Delivery.Default)); Assert.That(blend.Flavors, Contains.Item(Interleave.Default)); }