예제 #1
0
        public EndpointSettings ConfigureEndpoint(string name, string connectionString)
        {
            var endpointSettings = new EndpointSettings(name, connectionString);

            EndpointSettings.Add(endpointSettings);
            return(endpointSettings);
        }
예제 #2
0
        public Endpoint(EndpointSettings settings, ITransport transport)
        {
            _settings     = settings;
            this.Name     = settings.Name;
            this.IsReader = settings.IsReader;
            this.IsWriter = settings.IsWriter;

            if (settings.MessageTypes != null)
            {
                foreach (Type messageType in settings.MessageTypes)
                {
                    this.BoundMessageTypes.Add(messageType);
                }
            }

            if (settings.MessageTypeIdentifiers != null)
            {
                foreach (string messageTypeIdentifier in settings.MessageTypeIdentifiers)
                {
                    this.BoundMessageIdentifiers.Add(messageTypeIdentifier);
                }
            }

            //create the transport from the supplied factory
            if (transport != null)
            {
                _transport = transport;
            }

            if (_transport == null)
            {
                _transport = settings.TransportSettings.Create();
            }
        }
예제 #3
0
        /// <summary>
        /// Add a new endpoint = messaging source / destination
        /// </summary>
        /// <param name="endpointSettings"></param>
        public void AddEndpoint(EndpointSettings endpointSettings)
        {
            Endpoint endpoint = new Endpoint(endpointSettings);

            AddEndpoint(endpoint);
        }
예제 #4
0
 public Endpoint(EndpointSettings settings)
     : this(settings, null)
 {
 }