Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
// Code generated by Microsoft (R) AutoRest Code Generator 1.0.1.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.

namespace Microsoft.Azure.Management.ServiceFabric
{
using Microsoft.Azure;
using Microsoft.Azure.Management;
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
using System.Threading;
using System.Threading.Tasks;

/// <summary>
/// Extension methods for ClusterVersionsOperations.
/// </summary>
public static partial class ClusterVersionsOperationsExtensions
{
/// <summary>
/// List cluster code versions by location
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='location'>
/// The location for the cluster code versions, this is different from cluster
/// location
/// </param>
/// <param name='environment'>
/// Cluster operating system, the default means all. Possible values include:
/// 'Default', 'Windows', 'Linux'
/// </param>
public static IPage<ClusterCodeVersionsResult> List(this IClusterVersionsOperations operations, string location, string environment)
{
return operations.ListAsync(location, environment).GetAwaiter().GetResult();
}

/// <summary>
/// List cluster code versions by location
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='location'>
/// The location for the cluster code versions, this is different from cluster
/// location
/// </param>
/// <param name='environment'>
/// Cluster operating system, the default means all. Possible values include:
/// 'Default', 'Windows', 'Linux'
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<IPage<ClusterCodeVersionsResult>> ListAsync(this IClusterVersionsOperations operations, string location, string environment, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.ListWithHttpMessagesAsync(location, environment, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}

/// <summary>
/// List cluster code versions by location
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='nextPageLink'>
/// The NextLink from the previous successful call to List operation.
/// </param>
public static IPage<ClusterCodeVersionsResult> ListNext(this IClusterVersionsOperations operations, string nextPageLink)
{
return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult();
}

/// <summary>
/// List cluster code versions by location
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='nextPageLink'>
/// The NextLink from the previous successful call to List operation.
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<IPage<ClusterCodeVersionsResult>> ListNextAsync(this IClusterVersionsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}

}
}
Loading