Пример #1
0
 /// <summary>
 /// The List Resource Extensions operation lists the resource
 /// extensions that are available to add to a Virtual Machine. In
 /// Windows Azure, a process can run as a resource extension of a
 /// Virtual Machine. For example, Remote Desktop Access or the Windows
 /// Azure Diagnostics Agent can run as resource extensions to the
 /// Virtual Machine.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/dn495441.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Compute.IVirtualMachineExtensionOperations.
 /// </param>
 /// <returns>
 /// The List Resource Extensions operation response.
 /// </returns>
 public static VirtualMachineExtensionListResponse List(this IVirtualMachineExtensionOperations operations)
 {
     try
     {
         return(operations.ListAsync().Result);
     }
     catch (AggregateException ex)
     {
         if (ex.InnerExceptions.Count > 1)
         {
             throw;
         }
         else
         {
             throw ex.InnerException;
         }
     }
 }
 /// <summary>
 /// The List Resource Extensions operation lists the resource
 /// extensions that are available to add to a Virtual Machine. In
 /// Azure, a process can run as a resource extension of a Virtual
 /// Machine. For example, Remote Desktop Access or the Azure
 /// Diagnostics Agent can run as resource extensions to the Virtual
 /// Machine.  (see
 /// http://msdn.microsoft.com/en-us/library/windowsazure/dn495441.aspx
 /// for more information)
 /// </summary>
 /// <param name='operations'>
 /// Reference to the
 /// Microsoft.WindowsAzure.Management.Compute.IVirtualMachineExtensionOperations.
 /// </param>
 /// <returns>
 /// The List Resource Extensions operation response.
 /// </returns>
 public static Task <VirtualMachineExtensionListResponse> ListAsync(this IVirtualMachineExtensionOperations operations)
 {
     return(operations.ListAsync(CancellationToken.None));
 }