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)); }
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(); }
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)); }