Created
March 31, 2017 07:25
-
-
Save Dheer-Rajpoot/9dfe06945b5abe1d1b79aa32775d34f3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ReadXMLDataStepConverter : BasePipelineStepConverter<ItemModel> | |
{ | |
// the id from the pipeline step template you created named Read XML Data Pipeline Step. | |
private static readonly Guid TemplateId = Guid.Parse("{00191A02-F1B4-406C-B3CB-60568CCDD6D3}"); | |
public ReadXMLDataStepConverter(IItemModelRepository repository) : base(repository) | |
{ | |
this.SupportedTemplateIds.Add(TemplateId); | |
} | |
protected override void AddPlugins(ItemModel source, PipelineStep pipelineStep) | |
{ | |
AddEndpointSettings(source, pipelineStep); | |
} | |
private void AddEndpointSettings(ItemModel source, PipelineStep pipelineStep) | |
{ | |
//create the endpoint settings | |
var settings = new EndpointSettings(); | |
//populate the endpoint settings using values from the item | |
var endpointFrom = base.ConvertReferenceToModel<Endpoint>(source, ReadXMLDataStepItemModel.EndpointFrom); | |
if (endpointFrom != null) | |
{ | |
settings.EndpointFrom = endpointFrom; | |
} | |
//add the endpoint settings to the pipeline step | |
pipelineStep.Plugins.Add(settings); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment