/// <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)); }
private BatchClient(Protocol.BatchServiceClient customRestClient) : this() { this.ProtocolLayer = new ProtocolLayer(customRestClient); }