private Task <NetworkList> GetNetworkListAsyncHelper(NetworkQueryDescription queryDescription, TimeSpan timeout, CancellationToken cancellationToken) { return(Utility.WrapNativeAsyncInvokeInMTA <NetworkList>( (callback) => this.GetNetworkListAsyncBeginWrapper(queryDescription, timeout, callback), this.GetNetworkListAsyncEndWrapper, cancellationToken, "QueryManager.GetNetworkList")); }
/// <summary> /// <para> /// Gets the details for all container networks in the cluster. If the nodes do not fit in a page, one page of results is returned as well as a continuation token which can be used to get the next page. /// </para> /// </summary> public Task <NetworkList> GetNetworkListAsync(NetworkQueryDescription queryDescription, TimeSpan timeout, CancellationToken cancellationToken) { this.fabricClient.ThrowIfDisposed(); if (queryDescription != null) { NetworkQueryDescription.Validate(queryDescription); } return(this.GetNetworkListAsyncHelper(queryDescription, timeout, cancellationToken)); }
private NetworkQueryDescription GetNetworkQueryDescription() { var queryDescription = new NetworkQueryDescription(); if (!string.IsNullOrEmpty(this.Name)) { queryDescription.NetworkNameFilter = this.Name; } if (this.MaxResults.HasValue) { queryDescription.MaxResults = this.MaxResults.Value; } if (!string.IsNullOrEmpty(this.ContinuationToken)) { queryDescription.ContinuationToken = this.ContinuationToken; } return(queryDescription); }
private NativeCommon.IFabricAsyncOperationContext GetNetworkListAsyncBeginWrapper(NetworkQueryDescription queryDescription, TimeSpan timeout, NativeCommon.IFabricAsyncOperationCallback callback) { using (var pin = new PinCollection()) { return(this.nativeNetworkManagementClient.BeginGetNetworkList( queryDescription.ToNative(pin), Utility.ToMilliseconds(timeout, "timeout"), callback)); } }
/// <summary> /// <para> /// Gets the details for all container networks in the cluster. If the nodes do not fit in a page, one page of results is returned as well as a continuation token which can be used to get the next page. /// </para> /// </summary> public Task <NetworkList> GetNetworkListAsync(NetworkQueryDescription queryDescription) { return(this.GetNetworkListAsync(queryDescription, FabricClient.DefaultTimeout, CancellationToken.None)); }