Exemple #1
0
 /// <summary>
 /// Initializes a new instance of the Int16Value by deep copying the supplied IntValue class.
 /// </summary>
 /// <param name="source">The source Int16Value class.</param>
 public Int16Value(Int16Value source)
     : base(source)
 {
     if (source == null)
     {
         throw new ArgumentNullException(nameof(source));
     }
 }
Exemple #2
0
        /// <summary>
        /// Returns an Int16 representation of an Int16Value object.
        /// </summary>
        /// <param name="xmlAttribute">
        /// An Int16Value object to retrieve an Int16 representation.
        /// </param>
        /// <returns>An Int16 value that represents an Int16Value object.</returns>
        public static Int16 ToInt16(Int16Value xmlAttribute)
        {
            if (xmlAttribute == null)
            {
                throw new InvalidOperationException(ExceptionMessages.ImplicitConversionExceptionOnNull);
            }

            return(xmlAttribute.Value);
        }
Exemple #3
0
        /// <summary>
        /// Returns an <see cref="short"/> representation of an <see cref="Int16Value"/> object.
        /// </summary>
        /// <param name="value">
        /// An <see cref="Int16Value"/> object to retrieve an <see cref="short"/> representation.
        /// </param>
        /// <returns>An <see cref="short"/> value that represents an <see cref="Int16Value"/> object.</returns>
        public static short ToInt16(Int16Value value)
        {
            if (value is null)
            {
                throw new InvalidOperationException(ExceptionMessages.ImplicitConversionExceptionOnNull);
            }

            return(value.Value);
        }
Exemple #4
0
 /// <summary>
 /// Initializes a new instance of the Int16Value by deep copying the supplied IntValue class.
 /// </summary>
 /// <param name="source">The source Int16Value class.</param>
 public Int16Value(Int16Value source)
     : base(source)
 {
 }