/// <summary>
 /// Verify that numeric parameters are non negative
 /// </summary>
 private void ValidateNumericParameters()
 {
     NumericParameterValueChecker.CheckIfNegativeAndThrowException(
         new System.Collections.Generic.Dictionary <string, int>
     {
         { IntuneConstants.PinNumRetryProperty, PinNumRetry.Value },
         { IntuneConstants.AccessRecheckOfflineTimeoutProperty, this.AccessRecheckOfflineTimeout.Value },
         { IntuneConstants.AccessRecheckOnlineTimeoutProperty, this.AccessRecheckOnlineTimeout.Value },
         { IntuneConstants.OfflineWipeTimeoutProperty, this.OfflineWipeTimeout.Value }
     });
 }
Exemplo n.º 2
0
        /// <summary>
        /// Verify that numeric parameters are non negative
        /// </summary>
        private void ValidateNumericParameters()
        {
            Dictionary <string, int> paramsToValidate = new Dictionary <string, int>();

            if (PinNumRetry.HasValue)
            {
                paramsToValidate.Add(IntuneConstants.PinNumRetryProperty, PinNumRetry.Value);
            }
            if (this.AccessRecheckOfflineTimeout.HasValue)
            {
                paramsToValidate.Add(IntuneConstants.AccessRecheckOfflineTimeoutProperty, this.AccessRecheckOfflineTimeout.Value);
            }
            if (this.AccessRecheckOnlineTimeout.HasValue)
            {
                paramsToValidate.Add(IntuneConstants.AccessRecheckOnlineTimeoutProperty, this.AccessRecheckOnlineTimeout.Value);
            }
            if (this.OfflineWipeTimeout.HasValue)
            {
                paramsToValidate.Add(IntuneConstants.OfflineWipeTimeoutProperty, this.OfflineWipeTimeout.Value);
            }

            NumericParameterValueChecker.CheckIfNegativeAndThrowException(paramsToValidate);
        }