ATMLModelLibrary.model.Quantity.Validate C# (CSharp) Method

Validate() public method

public Validate ( ) : void
return void
        public void Validate()
        {
            if (_unit != null)
                _unit.Validate();
            var rgx = new Regex(PATTERN);
            if (!rgx.Match(ToString()).Success)
                throw new Exception(string.Format("Invalid Physical Expression - {0}", ToString()));
        }

Usage Example

Example #1
0
 public void Validate()
 {
     if (_anyQuantity != null)
     {
         _anyQuantity.Validate();
     }
 }
All Usage Examples Of ATMLModelLibrary.model.Quantity::Validate