Пример #1
0
 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"));
 }
Пример #2
0
 /// <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));
 }
Пример #3
0
        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);
        }
Пример #4
0
 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));
     }
 }
Пример #5
0
 /// <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));
 }