public override void ExecuteCmdlet()
        {
            if (ResourceGroupName != null && string.IsNullOrWhiteSpace(ResourceGroupName))
            {
                throw new PSArgumentNullException("ResourceGroupName");
            }

            if (JobName != null && string.IsNullOrWhiteSpace(JobName))
            {
                throw new PSArgumentNullException("JobName");
            }

            if (Name == null || string.IsNullOrWhiteSpace(Name))
            {
                Name = string.Empty;
            }

            InputFilterOptions filterOptions = new InputFilterOptions()
            {
                Name              = Name,
                JobName           = JobName,
                ResourceGroupName = ResourceGroupName
            };

            WriteObject(StreamAnalyticsClient.FilterPSInputs(filterOptions), true);
        }
Ejemplo n.º 2
0
        public override void ExecuteCmdlet()
        {
            if (ResourceGroupName != null && string.IsNullOrWhiteSpace(ResourceGroupName))
            {
                throw new PSArgumentNullException("ResourceGroupName");
            }

            if (JobName != null && string.IsNullOrWhiteSpace(JobName))
            {
                throw new PSArgumentNullException("JobName");
            }

            if (Name == null || string.IsNullOrWhiteSpace(Name))
            {
                Name = string.Empty;
            }

            InputFilterOptions filterOptions = new InputFilterOptions()
            {
                Name              = Name,
                JobName           = JobName,
                ResourceGroupName = ResourceGroupName
            };

            List <PSInput> inputs = StreamAnalyticsClient.FilterPSInputs(filterOptions);

            if (inputs != null)
            {
                if (inputs.Count == 1 && Name != null)
                {
                    WriteObject(inputs[0]);
                }
                else
                {
                    WriteObject(inputs, true);
                }
            }
        }