ListDataSlices() public method

public ListDataSlices ( Microsoft.Azure.Commands.DataFactories.DataSliceFilterOptions filterOptions ) : List
filterOptions Microsoft.Azure.Commands.DataFactories.DataSliceFilterOptions
return List
        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;
            }

            var dataSlices = DataFactoryClient.ListDataSlices(
                ResourceGroupName, DataFactoryName, TableName, StartDateTime,
                EndDateTime);

            if (dataSlices == null || dataSlices.Count == 0)
            {
                WriteWarning(string.Format(
                                 CultureInfo.InvariantCulture,
                                 Resources.NoDataSliceFound));
            }

            WriteObject(dataSlices, true);
        }
        protected override void ProcessRecord()
        {
            if (ParameterSetName == ByFactoryObject)
            {
                if (DataFactory == null)
                {
                    throw new PSArgumentNullException(string.Format(CultureInfo.InvariantCulture, Resources.DataFactoryArgumentInvalid));
                }

                DataFactoryName   = DataFactory.DataFactoryName;
                ResourceGroupName = DataFactory.ResourceGroupName;
            }

            DataSliceFilterOptions filterOptions = new DataSliceFilterOptions()
            {
                ResourceGroupName       = ResourceGroupName,
                DataFactoryName         = DataFactoryName,
                DatasetName             = this.DatasetName,
                DataSliceRangeStartTime = StartDateTime,
                DataSliceRangeEndTime   = EndDateTime
            };

            int totalDataSlices = 0;

            do
            {
                var dataSlices = DataFactoryClient.ListDataSlices(filterOptions);
                totalDataSlices += dataSlices.Count;
                WriteObject(dataSlices, true);
            } while (filterOptions.NextLink.IsNextPageLink());

            if (totalDataSlices == 0)
            {
                WriteWarning(string.Format(CultureInfo.InvariantCulture, Resources.NoDataSliceFound));
            }
        }