Beispiel #1
0
        /// <summary>
        /// Returns the internal Boolean representation of a OnOffValue object.
        /// </summary>
        /// <param name="xmlAttribute">A OnOffValue object to retrieve an internal Boolean representation.</param>
        /// <returns>A Boolean value that represents a OnOffValue object.</returns>
        public static Boolean ToBoolean(OnOffValue xmlAttribute)
        {
            if (xmlAttribute == null)
            {
                throw new InvalidOperationException(ExceptionMessages.ImplicitConversionExceptionOnNull);
            }

            return(xmlAttribute.Value);
        }
Beispiel #2
0
 /// <summary>
 /// Initializes a new instance of <see cref="OnOffValue"/> class using the supplied OnOffValue class.
 /// </summary>
 /// <param name="source">The source <see cref="OnOffValue"/> class.</param>
 public OnOffValue(OnOffValue source)
     : base(source)
 {
     if (source == null)
     {
         throw new ArgumentNullException(nameof(source));
     }
     Initialize();
     _impl.InnerText = source.InnerText;
 }
Beispiel #3
0
 /// <summary>
 /// Initializes a new instance of <see cref="OnOffValue"/> class using the supplied OnOffValue class.
 /// </summary>
 /// <param name="source">The source <see cref="OnOffValue"/> class.</param>
 public OnOffValue(OnOffValue source)
     : base(source)
 {
 }