CreateJoin() public method

public CreateJoin ( string pipeUri, string routingKey ) : paramore.brighter.commandprocessor.messaginggateway.restms.Model.RestMSJoin
pipeUri string
routingKey string
return paramore.brighter.commandprocessor.messaginggateway.restms.Model.RestMSJoin
コード例 #1
0
        public void EnsurePipeExists(string pipeTitle, string routingKey, RestMSDomain domain)
        {
            gateway.Logger.DebugFormat("Checking for existence of the pipe {0} on the RestMS server: {1}", pipeTitle, gateway.Configuration.RestMS.Uri.AbsoluteUri);
            var pipeExists = PipeExists(pipeTitle, domain);

            if (!pipeExists)
            {
                domain = CreatePipe(domain.Href, pipeTitle);
                if (domain == null || !domain.Pipes.Any(dp => dp.Title == pipeTitle))
                {
                    throw new RestMSClientException(string.Format("Unable to create pipe {0} on the default domain; see log for errors", pipeTitle));
                }

                join.CreateJoin(domain.Pipes.First(p => p.Title == pipeTitle).Href, routingKey);
            }

            PipeUri = domain.Pipes.First(dp => dp.Title == pipeTitle).Href;
        }