Esempio n. 1
0
        /// <summary>
        ///     Initializes a new instance of the <see cref="PrimitiveTypeMapping" /> structure.
        /// </summary>
        /// <param name="primitiveType">The <see cref="Type" /> used to initialize the instance.</param>
        /// <exception cref="ArgumentException">thrown if the <paramref name="type" /> is not primitive.</exception>
        /// <exception cref="ArgumentNullException">thrown if the <paramref name="type" /> is <c>Null</c>.</exception>
        public PrimitiveTypeMapping(Type type)
        {
            if (type == null)
            {
                throw new ArgumentNullException(nameof(type));
            }
            if (!PrimitiveTypeMapping.IsPrimitiveType(type))
            {
                throw new ArgumentException(nameof(type));
            }

            this.PrimitiveType = type;
        }
Esempio n. 2
0
 public bool Equals(PrimitiveTypeMapping obj)
 {
     return(this.PrimitiveType.Equals(obj.PrimitiveType));
 }