Exemplo n.º 1
0
 /// <summary>
 /// Use this method to get the device security group for the specified IoT Hub
 /// resource.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceId'>
 /// The identifier of the resource.
 /// </param>
 /// <param name='deviceSecurityGroupName'>
 /// The name of the device security group. Note that the name of the device
 /// security group is case insensitive.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <DeviceSecurityGroup> GetAsync(this IDeviceSecurityGroupsOperations operations, string resourceId, string deviceSecurityGroupName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.GetWithHttpMessagesAsync(resourceId, deviceSecurityGroupName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Use this method get the list of device security groups for the specified
 /// IoT Hub resource.
 /// </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 <DeviceSecurityGroup> > ListNextAsync(this IDeviceSecurityGroupsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Exemplo n.º 3
0
 /// <summary>
 /// Use this method to get the device security group for the specified IoT Hub
 /// resource.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceId'>
 /// The identifier of the resource.
 /// </param>
 /// <param name='deviceSecurityGroupName'>
 /// The name of the device security group. Note that the name of the device
 /// security group is case insensitive.
 /// </param>
 public static DeviceSecurityGroup Get(this IDeviceSecurityGroupsOperations operations, string resourceId, string deviceSecurityGroupName)
 {
     return(operations.GetAsync(resourceId, deviceSecurityGroupName).GetAwaiter().GetResult());
 }
Exemplo n.º 4
0
 /// <summary>
 /// Use this method get the list of device security groups for the specified
 /// IoT Hub resource.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceId'>
 /// The identifier of the resource.
 /// </param>
 public static IPage <DeviceSecurityGroup> List(this IDeviceSecurityGroupsOperations operations, string resourceId)
 {
     return(operations.ListAsync(resourceId).GetAwaiter().GetResult());
 }
Exemplo n.º 5
0
 /// <summary>
 /// Use this method get the list of device security groups for the specified
 /// IoT Hub resource.
 /// </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 <DeviceSecurityGroup> ListNext(this IDeviceSecurityGroupsOperations operations, string nextPageLink)
 {
     return(operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
Exemplo n.º 6
0
 /// <summary>
 /// User this method to deletes the device security group.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceId'>
 /// The identifier of the resource.
 /// </param>
 /// <param name='deviceSecurityGroupName'>
 /// The name of the device security group. Note that the name of the device
 /// security group is case insensitive.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this IDeviceSecurityGroupsOperations operations, string resourceId, string deviceSecurityGroupName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(resourceId, deviceSecurityGroupName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
Exemplo n.º 7
0
 /// <summary>
 /// User this method to deletes the device security group.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceId'>
 /// The identifier of the resource.
 /// </param>
 /// <param name='deviceSecurityGroupName'>
 /// The name of the device security group. Note that the name of the device
 /// security group is case insensitive.
 /// </param>
 public static void Delete(this IDeviceSecurityGroupsOperations operations, string resourceId, string deviceSecurityGroupName)
 {
     operations.DeleteAsync(resourceId, deviceSecurityGroupName).GetAwaiter().GetResult();
 }
Exemplo n.º 8
0
 /// <summary>
 /// Use this method to creates or updates the device security group on a
 /// specified IoT Hub resource.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceId'>
 /// The identifier of the resource.
 /// </param>
 /// <param name='deviceSecurityGroupName'>
 /// The name of the device security group. Note that the name of the device
 /// security group is case insensitive.
 /// </param>
 /// <param name='deviceSecurityGroup'>
 /// Security group object.
 /// </param>
 public static DeviceSecurityGroup CreateOrUpdate(this IDeviceSecurityGroupsOperations operations, string resourceId, string deviceSecurityGroupName, DeviceSecurityGroup deviceSecurityGroup)
 {
     return(operations.CreateOrUpdateAsync(resourceId, deviceSecurityGroupName, deviceSecurityGroup).GetAwaiter().GetResult());
 }