private async Task <IVirtualMachineExtension> GetEncryptionExtensionAsync(CancellationToken cancellationToken = default(CancellationToken))
        {
            var extensions = await this.virtualMachine.ListExtensionsAsync();

            foreach (var extension in extensions)
            {
                if (EncryptionExtensionIdentifier.IsEncryptionPublisherName(extension.PublisherName) &&
                    EncryptionExtensionIdentifier.IsEncryptionTypeName(extension.TypeName, this.virtualMachine.OSType))
                {
                    return(extension);
                }
            }
            return(null);
        }
        ///GENMHASH:5A2D79502EDA81E37A36694062AEDC65:061A846F0F7CA8B3F2DF8CA79A8D8B5A
        public async Task <Microsoft.Azure.Management.Compute.Fluent.IDiskVolumeEncryptionMonitor> RefreshAsync(CancellationToken cancellationToken = default(CancellationToken))
        {
            // Refreshes the cached Windows virtual machine and installed encryption extension
            //
            var virtualMachine = await RetrieveVirtualMachineAsync(cancellationToken);

            this.virtualMachine = virtualMachine;
            if (virtualMachine.Resources != null)
            {
                foreach (var extension in virtualMachine.Resources)
                {
                    if (EncryptionExtensionIdentifier.IsEncryptionPublisherName(extension.Publisher) &&
                        EncryptionExtensionIdentifier.IsEncryptionTypeName(extension.VirtualMachineExtensionType, OperatingSystemTypes.Windows))
                    {
                        this.encryptionExtension = extension;
                        break;
                    }
                }
            }
            return(this);
        }