public override void ExecuteCmdlet()
{
if (ParameterSetName == ByFactoryObject)
{
if (DataFactory == null)
{
throw new PSArgumentNullException(string.Format(CultureInfo.InvariantCulture, Resources.DataFactoryArgumentInvalid));
}
DataFactoryName = DataFactory.DataFactoryName;
ResourceGroupName = DataFactory.ResourceGroupName;
}
PipelineFilterOptions filterOptions = new PipelineFilterOptions()
{
Name = Name,
ResourceGroupName = ResourceGroupName,
DataFactoryName = DataFactoryName
};
List <PSPipeline> pipelines = DataFactoryClient.FilterPSPipelines(filterOptions);
if (pipelines != null)
{
if (pipelines.Count == 1 && Name != null)
{
WriteObject(pipelines[0]);
}
else
{
WriteObject(pipelines, true);
}
}
}