/// <inheritdoc />
        public async Task <IEnumerable <ApplicationAttemptDetails> > ListApplicationAttemptsAsync(ApplicationDetails application)
        {
            ApplicationAttemptListResult attemptListResult = await this.readProxy.ListApplicationAttemptsAsync(application.ApplicationId);

            ApplicationAttemptList attempts = new ApplicationAttemptList(attemptListResult, application);

            return(attempts.ApplicationAttempts);
        }
Esempio n. 2
0
        /// <summary>
        /// Initializes a new instance of the ApplicationAttemptList class.
        /// </summary>
        /// <param name="applicationAttemptListResult">
        /// Result of a REST call, containing list of application attempts.
        /// </param>
        /// <param name="parentApplication">
        /// The parent ApplicationDetails object.
        /// </param>
        internal ApplicationAttemptList(ApplicationAttemptListResult applicationAttemptListResult, ApplicationDetails parentApplication)
        {
            if (applicationAttemptListResult == null)
            {
                throw new ArgumentNullException("applicationAttemptListResult");
            }

            if (parentApplication == null)
            {
                throw new ArgumentNullException("parentApplication");
            }

            this.ApplicationAttempts = applicationAttemptListResult.ApplicationAttempts.Select(applicationAttemptResult => new ApplicationAttemptDetails(applicationAttemptResult, parentApplication));
        }
        /// <summary>
        /// Initializes a new instance of the ApplicationAttemptList class.
        /// </summary>
        /// <param name="applicationAttemptListResult">
        /// Result of a REST call, containing list of application attempts.
        /// </param>
        /// <param name="parentApplication">
        /// The parent ApplicationDetails object.
        /// </param>
        internal ApplicationAttemptList(ApplicationAttemptListResult applicationAttemptListResult, ApplicationDetails parentApplication)
        {
            if (applicationAttemptListResult == null)
            {
                throw new ArgumentNullException("applicationAttemptListResult");
            }

            if (parentApplication == null)
            {
                throw new ArgumentNullException("parentApplication");
            }

            this.ApplicationAttempts = applicationAttemptListResult.ApplicationAttempts.Select(applicationAttemptResult => new ApplicationAttemptDetails(applicationAttemptResult, parentApplication));
        }