Пример #1
0
        /// <summary>
        /// Blocking call that creates an instance of <see cref="BatchClient"/> associated with the specified <see cref="Microsoft.Azure.Batch.Protocol.BatchServiceClient"/>.
        /// </summary>
        /// <param name="restClient">The instance of <see cref="Microsoft.Azure.Batch.Protocol.BatchServiceClient"/> to use for all calls made to the Batch Service. It will not be disposed when BatchClient is disposed.</param>
        /// <returns>An instance of <see cref="Microsoft.Azure.Batch.Protocol.BatchServiceClient"/>.</returns>
        public static BatchClient Open(Protocol.BatchServiceClient restClient)
        {
            if (null == restClient)
            {
                throw new ArgumentNullException(nameof(restClient));
            }

            return(new BatchClient(restClient));
        }
Пример #2
0
 private BatchClient(Protocol.BatchServiceClient customRestClient)
     : this()
 {
     this.ProtocolLayer = new ProtocolLayer(customRestClient);
 }