Skip to content
This repository was archived by the owner on Aug 26, 2025. It is now read-only.
Closed
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.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,208 @@
// <auto-generated>
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>

namespace Microsoft.Azure.Management.EngagementFabric
{
using Microsoft.Rest;
using Microsoft.Rest.Azure;
using Models;
using System.Collections;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;

/// <summary>
/// Extension methods for ChannelsOperations.
/// </summary>
public static partial class ChannelsOperationsExtensions
{
/// <summary>
/// Get the EngagementFabric channel
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='resourceGroupName'>
/// Resource Group Name
/// </param>
/// <param name='accountName'>
/// Account Name
/// </param>
/// <param name='channelName'>
/// Channel Name
/// </param>
public static Channel Get(this IChannelsOperations operations, string resourceGroupName, string accountName, string channelName)
{
return operations.GetAsync(resourceGroupName, accountName, channelName).GetAwaiter().GetResult();
}

/// <summary>
/// Get the EngagementFabric channel
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='resourceGroupName'>
/// Resource Group Name
/// </param>
/// <param name='accountName'>
/// Account Name
/// </param>
/// <param name='channelName'>
/// Channel Name
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<Channel> GetAsync(this IChannelsOperations operations, string resourceGroupName, string accountName, string channelName, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, accountName, channelName, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}

/// <summary>
/// Create or Update the EngagementFabric channel
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='resourceGroupName'>
/// Resource Group Name
/// </param>
/// <param name='accountName'>
/// Account Name
/// </param>
/// <param name='channelName'>
/// Channel Name
/// </param>
/// <param name='channel'>
/// The EngagementFabric channel description
/// </param>
public static Channel CreateOrUpdate(this IChannelsOperations operations, string resourceGroupName, string accountName, string channelName, Channel channel)
{
return operations.CreateOrUpdateAsync(resourceGroupName, accountName, channelName, channel).GetAwaiter().GetResult();
}

/// <summary>
/// Create or Update the EngagementFabric channel
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='resourceGroupName'>
/// Resource Group Name
/// </param>
/// <param name='accountName'>
/// Account Name
/// </param>
/// <param name='channelName'>
/// Channel Name
/// </param>
/// <param name='channel'>
/// The EngagementFabric channel description
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<Channel> CreateOrUpdateAsync(this IChannelsOperations operations, string resourceGroupName, string accountName, string channelName, Channel channel, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, accountName, channelName, channel, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}

/// <summary>
/// Delete the EngagementFabric channel
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='resourceGroupName'>
/// Resource Group Name
/// </param>
/// <param name='accountName'>
/// Account Name
/// </param>
/// <param name='channelName'>
/// The EngagementFabric channel name
/// </param>
public static void Delete(this IChannelsOperations operations, string resourceGroupName, string accountName, string channelName)
{
operations.DeleteAsync(resourceGroupName, accountName, channelName).GetAwaiter().GetResult();
}

/// <summary>
/// Delete the EngagementFabric channel
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='resourceGroupName'>
/// Resource Group Name
/// </param>
/// <param name='accountName'>
/// Account Name
/// </param>
/// <param name='channelName'>
/// The EngagementFabric channel name
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task DeleteAsync(this IChannelsOperations operations, string resourceGroupName, string accountName, string channelName, CancellationToken cancellationToken = default(CancellationToken))
{
(await operations.DeleteWithHttpMessagesAsync(resourceGroupName, accountName, channelName, null, cancellationToken).ConfigureAwait(false)).Dispose();
}

/// <summary>
/// List the EngagementFabric channels
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='resourceGroupName'>
/// Resource Group Name
/// </param>
/// <param name='accountName'>
/// Account Name
/// </param>
public static IEnumerable<Channel> ListByAccount(this IChannelsOperations operations, string resourceGroupName, string accountName)
{
return operations.ListByAccountAsync(resourceGroupName, accountName).GetAwaiter().GetResult();
}

/// <summary>
/// List the EngagementFabric channels
/// </summary>
/// <param name='operations'>
/// The operations group for this extension method.
/// </param>
/// <param name='resourceGroupName'>
/// Resource Group Name
/// </param>
/// <param name='accountName'>
/// Account Name
/// </param>
/// <param name='cancellationToken'>
/// The cancellation token.
/// </param>
public static async Task<IEnumerable<Channel>> ListByAccountAsync(this IChannelsOperations operations, string resourceGroupName, string accountName, CancellationToken cancellationToken = default(CancellationToken))
{
using (var _result = await operations.ListByAccountWithHttpMessagesAsync(resourceGroupName, accountName, null, cancellationToken).ConfigureAwait(false))
{
return _result.Body;
}
}

}
}
Loading