Opc.Ua.NumericRange.Parse C# (CSharp) Method

Parse() public static method

Parses a string representing a numeric range.
Parses a string representing a numeric range.
Thrown when the numeric value of the parsed text is out of range
public static Parse ( string textToParse ) : NumericRange
textToParse string The text to parse, prior to checking it is within the allowed range
return NumericRange
        public static NumericRange Parse(string textToParse)
        {
            NumericRange range = NumericRange.Empty;

            ServiceResult result = Validate(textToParse, out range);

            if (ServiceResult.IsBad(result))
            {
                throw new ServiceResultException(result);
            }

            return range;
        }
        #endregion

Usage Example

コード例 #1
0
        /// <summary>
        /// Converts an AttributeOperand to a displayable string.
        /// </summary>
        public override string ToString(INodeTable nodeTable)
        {
            StringBuilder buffer = new StringBuilder();

            INode node = nodeTable.Find(TypeDefinitionId);

            if (node != null)
            {
                buffer.AppendFormat("{0}", TypeDefinitionId);
            }
            else
            {
                buffer.AppendFormat("{0}", TypeDefinitionId);
            }

            if (BrowsePath != null && BrowsePath.Count > 0)
            {
                buffer.AppendFormat("{0}", Format(BrowsePath));
            }

            if (!String.IsNullOrEmpty(IndexRange))
            {
                buffer.AppendFormat("[{0}]", NumericRange.Parse(IndexRange));
            }

            return(buffer.ToString());
        }
All Usage Examples Of Opc.Ua.NumericRange::Parse