/// <summary> /// The List Resource Extension Versions operation lists the versions /// of a resource extension 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/dn495440.aspx /// for more information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Compute.IVirtualMachineExtensionOperations. /// </param> /// <param name='publisherName'> /// The name of the publisher. /// </param> /// <param name='extensionName'> /// The name of the extension. /// </param> /// <returns> /// The List Resource Extensions operation response. /// </returns> public static VirtualMachineExtensionListResponse ListVersions(this IVirtualMachineExtensionOperations operations, string publisherName, string extensionName) { try { return(operations.ListVersionsAsync(publisherName, extensionName).Result); } catch (AggregateException ex) { if (ex.InnerExceptions.Count > 1) { throw; } else { throw ex.InnerException; } } }
/// <summary> /// The List Resource Extension Versions operation lists the versions /// of a resource extension 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/dn495440.aspx /// for more information) /// </summary> /// <param name='operations'> /// Reference to the /// Microsoft.WindowsAzure.Management.Compute.IVirtualMachineExtensionOperations. /// </param> /// <param name='publisherName'> /// Required. The name of the publisher. /// </param> /// <param name='extensionName'> /// Required. The name of the extension. /// </param> /// <returns> /// The List Resource Extensions operation response. /// </returns> public static Task <VirtualMachineExtensionListResponse> ListVersionsAsync(this IVirtualMachineExtensionOperations operations, string publisherName, string extensionName) { return(operations.ListVersionsAsync(publisherName, extensionName, CancellationToken.None)); }