Beispiel #1
0
 private static bool IsOptionDefaultValue(MinerOption option, string value)
 {
     if (string.IsNullOrEmpty(value))
     {
         return(true);
     }
     if (string.IsNullOrWhiteSpace(value))
     {
         return(true);
     }
     if (value.Equals(option.DefaultValue))
     {
         return(true);
     }
     return(false);
 }
Beispiel #2
0
        /// <summary>
        /// IsOptionDefaultValue checks if parsed value is same as default value of MinerOption
        /// </summary>
        private static bool IsOptionDefaultValue(MinerOption option, string value)
        {
            // Check if value is null or empty
            if (string.IsNullOrEmpty(value))
            {
                return(true);
            }
            if (string.IsNullOrWhiteSpace(value))
            {
                return(true);
            }

            // Value is not null or empty, compare it with default value
            if (!value.Equals(option.DefaultValue))
            {
                return(false);
            }

            return(true);
        }