public void Execute(IBaseMessageContext context)
        {
            context.EnsureSftpOutboundTransport();

            var builder          = new UriBuilder(context.GetProperty(BtsProperties.OutboundTransportLocation));
            var folder           = context.GetProperty(SftpProperties.FolderPath);
            var subFolderAndFile = context.GetProperty(BizTalkFactoryProperties.OutboundTransportLocation);

            if (subFolderAndFile.IsNullOrEmpty())
            {
                throw new InvalidOperationException(
                          "Target sub folder and file name were expected to be found in BizTalkFactoryProperties.OutboundTransportLocation context property.");
            }
            builder.Path = Path.Combine(folder, subFolderAndFile);
            context.SetProperty(BtsProperties.OutboundTransportLocation, builder.ToString());
        }
        public void Execute(IBaseMessageContext context)
        {
            context.EnsureSftpOutboundTransport();

            // enabling IsDynamicSend is required
            context.SetProperty(BtsProperties.IsDynamicSend, true);

            var folder           = context.GetProperty(SftpProperties.FolderPath);
            var subFolderAndFile = context.GetProperty(BizTalkFactoryProperties.OutboundTransportLocation);

            if (subFolderAndFile.IsNullOrEmpty())
            {
                throw new InvalidOperationException(
                          "Target sub folder and file name were expected to be found in BizTalkFactoryProperties.OutboundTransportLocation context property.");
            }
            var subFolder = Path.GetDirectoryName(subFolderAndFile);
            var file      = Path.GetFileName(subFolderAndFile);

            context.SetProperty(SftpProperties.FolderPath, Path.Combine(folder, subFolder !).Replace('\\', '/'));
            context.SetProperty(SftpProperties.TargetFileName, file);
        }