示例#1
0
        /// <inheritdoc/>
        public void WaitForVMState(VirtualMachineState expectedState, VirtualMachineState[] errorStates, int refreshCount = 600, TimeSpan?refreshDelay = null, Action <int> progressUpdatedCallback = null)
        {
            if (expectedState == null)
            {
                throw new ArgumentNullException("expectedState");
            }
            if (errorStates == null)
            {
                throw new ArgumentNullException("errorStates");
            }
            if (refreshCount < 0)
            {
                throw new ArgumentOutOfRangeException("refreshCount");
            }
            if (refreshDelay < TimeSpan.Zero)
            {
                throw new ArgumentOutOfRangeException("refreshDelay");
            }

            var details = Provider.WaitForVMState(Id, expectedState, errorStates, refreshCount, refreshDelay ?? TimeSpan.FromMilliseconds(2400), progressUpdatedCallback, Region, Identity);

            UpdateThis(details);
        }
 /// <inheritdoc/>
 protected override VirtualMachineState FromName(string name)
 {
     return(VirtualMachineState.FromName(name));
 }