Exemplo n.º 1
0
        internal IPort Create(RuntimeTypeGenerator typeGenerator, string poisonQueue, bool?hubAutoCreateQueues, string hubAutoCreateQueuesIdentity, InterceptMessageForwarding interceptMethod, int immediateRetries, int delayedRetries, int circuitBreakerThreshold)
        {
            var routing = new RoutingConfiguration(typeGenerator, EndpointInstances, subscriptionStorage, DistributionPolicy);

            return(new Port <T>(Name, customization, routing, poisonQueue, maximumConcurrency, interceptMethod,
                                autoCreateQueues ?? hubAutoCreateQueues ?? false, autoCreateQueuesIdentity ?? hubAutoCreateQueuesIdentity, immediateRetries, delayedRetries, circuitBreakerThreshold, nullForwarding));
        }
 public RoutingConfiguration(RuntimeTypeGenerator typeGenerator, EndpointInstances endpointInstances, ISubscriptionStorage subscriptionPersistence, RawDistributionPolicy distributionPolicy)
 {
     this.typeGenerator           = typeGenerator;
     this.endpointInstances       = endpointInstances;
     this.subscriptionPersistence = subscriptionPersistence;
     this.distributionPolicy      = distributionPolicy;
 }
    public void Can_create_dynamic_type_for_a_nested_type()
    {
        var router = new RuntimeTypeGenerator();
        var type   = router.GetType("MyNamespace.MyType+NestedType, MyAssembly");

        Assert.AreEqual("MyNamespace.MyType+NestedType, MyAssembly, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", type.AssemblyQualifiedName);
    }
Exemplo n.º 4
0
    public void Returns_a_known_type_even_if_version_does_not_match()
    {
        var router = new RuntimeTypeGenerator();
        var type   = router.GetType("MyNamespace.MyKnownType, NServiceBus.Bridge.Tests.Helpers, Version=1.2.3.4");

        Assert.AreSame(type, typeof(MyKnownType));
    }
Exemplo n.º 5
0
    public void Returns_a_known_type()
    {
        var router = new RuntimeTypeGenerator();
        var type   = router.GetType("MyNamespace.MyKnownType, NServiceBus.Bridge.Tests.Helpers");

        Assert.AreSame(type, typeof(MyKnownType));
    }
    public void Can_create_dynamic_type_when_assembly_is_not_specified()
    {
        var router = new RuntimeTypeGenerator();
        var type   = router.GetType("MyNamespace.MyType");

        Assert.AreEqual("NServiceBus.Router.UnknownAssembly", type.Assembly.GetName().Name);
        Assert.AreEqual("MyNamespace.MyType, NServiceBus.Router.UnknownAssembly, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", type.AssemblyQualifiedName);
    }
Exemplo n.º 7
0
 public RuleCreationContext(string interfaceName, EndpointInstances endpointInstances, RawDistributionPolicy distributionPolicy, IRawEndpoint endpoint, RuntimeTypeGenerator typeGenerator, ReadOnlySettings settings)
 {
     InterfaceName      = interfaceName;
     EndpointInstances  = endpointInstances;
     DistributionPolicy = distributionPolicy;
     Endpoint           = endpoint;
     TypeGenerator      = typeGenerator;
     Settings           = settings;
 }
 public SubscribePreroutingTerminator(IRoutingProtocol routingProtocol, RuntimeTypeGenerator typeGenerator)
 {
     this.routingProtocol = routingProtocol;
     this.typeGenerator   = typeGenerator;
 }
 public PublishPreroutingTerminator(string[] allInterfaces, RuntimeTypeGenerator typeGenerator)
 {
     this.allInterfaces = allInterfaces;
     this.typeGenerator = typeGenerator;
 }
Exemplo n.º 10
0
 public NativeSubscriptionForwarder(IManageSubscriptions subscriptionManager, RuntimeTypeGenerator typeGenerator, EndpointInstances endpointInstances)
 {
     this.subscriptionManager = subscriptionManager;
     this.typeGenerator       = typeGenerator;
     this.endpointInstances   = endpointInstances;
 }
 public SubscribePreroutingTerminator(string[] allInterfaces, IRoutingProtocol routingProtocol, RuntimeTypeGenerator typeGenerator)
 {
     this.allInterfaces   = allInterfaces;
     this.routingProtocol = routingProtocol;
     this.typeGenerator   = typeGenerator;
 }
Exemplo n.º 12
0
 public NativePublishRouter(RuntimeTypeGenerator typeGenerator)
 {
     this.typeGenerator = typeGenerator;
 }