Example #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="RestService"/> class.
        /// </summary>
        /// <param name="requestExecutionStrategy">The <see cref="IRequestExecutionStrategy"/>.</param>
        /// <exception cref="ArgumentNullException">The value of '<paramref name="requestExecutionStrategy"/>' cannot be null. </exception>
        protected RestService([NotNull] IRequestExecutionStrategy requestExecutionStrategy)
        {
            if (requestExecutionStrategy == null)
            {
                throw new ArgumentNullException(nameof(requestExecutionStrategy));
            }

            this.requestExecutionStrategy = requestExecutionStrategy;
        }
Example #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="GoogleServiceBase"/> class.
        /// </summary>
        /// <param name="requestExecutionStrategy">The <see cref="IRequestExecutionStrategy"/>.</param>
        /// <param name="authorizationContextConfiguration">The <see cref="IAuthorizationContextConfiguration"/>.</param>
        /// <exception cref="ArgumentNullException">The value of '<paramref name="authorizationContextConfiguration"/>' and '<paramref name="requestExecutionStrategy"/>' cannot be null. </exception>
        public GoogleServiceBase([NotNull] IRequestExecutionStrategy requestExecutionStrategy,
                                 [NotNull] IAuthorizationContextConfiguration authorizationContextConfiguration)
            : base(requestExecutionStrategy)
        {
            if (authorizationContextConfiguration == null)
            {
                throw new ArgumentNullException(nameof(authorizationContextConfiguration));
            }

            this.AuthorizationContextConfiguration = authorizationContextConfiguration;
        }