Exemplo n.º 1
0
        public IEnumerable <JobStream> GetJobStream(string automationAccountName, Guid jobId, DateTime?time,
                                                    string streamType)
        {
            var listParams = new AutomationManagement.Models.JobStreamListParameters();

            if (time.HasValue)
            {
                listParams.Time = time.Value.ToUniversalTime().ToString();
            }

            if (streamType != null)
            {
                listParams.StreamType = streamType;
            }

            var jobStreams =
                this.automationManagementClient.JobStreams.List(automationAccountName, jobId, listParams).JobStreams;

            return(jobStreams.Select(this.CreateJobStreamFromJobStreamModel));
        }
Exemplo n.º 2
0
        public IEnumerable<JobStream> GetJobStream(string automationAccountName, Guid jobId, DateTimeOffset? time,
           string streamType)
        {
            var listParams = new AutomationManagement.Models.JobStreamListParameters();

            if (time.HasValue)
            {
                listParams.Time = this.FormatDateTime(time.Value);
            }

            if (streamType != null)
            {
                listParams.StreamType = streamType;
            }

            var jobStreams = this.automationManagementClient.JobStreams.List(automationAccountName, jobId, listParams).JobStreams;
            return jobStreams.Select(stream => this.CreateJobStreamFromJobStreamModel(stream, automationAccountName, jobId)).ToList();
        }
Exemplo n.º 3
0
        public IEnumerable<JobStream> GetJobStream(string resourceGroupName, string automationAccountName, Guid jobId, DateTimeOffset? time,
            string streamType, ref string nextLink)
        {
            var listParams = new AutomationManagement.Models.JobStreamListParameters();

            if (time.HasValue)
            {
                listParams.Time = this.FormatDateTime(time.Value);
            }

            if (streamType != null)
            {
                listParams.StreamType = streamType;
            }

            JobStreamListResponse response;

            if (string.IsNullOrEmpty(nextLink))
            {
                response = this.automationManagementClient.JobStreams.List(resourceGroupName, automationAccountName, jobId, listParams);
            }
            else
            {
                response = this.automationManagementClient.JobStreams.ListNext(nextLink);
            }

            nextLink = response.NextLink;
            return
                response.JobStreams.Select(
                    stream => this.CreateJobStreamFromJobStreamModel(stream, resourceGroupName, automationAccountName, jobId));
        }