Example #1
0
        /// <summary>
        /// Fills the destination object by using the supplied mappings in the <see cref="IParserContext"/>.
        /// </summary>
        /// <param name="destination">The destination.</param>
        /// <param name="parserContext">The <see cref="IParserContext"/>.</param>
        /// <exception cref="ArgumentNullException">The value of '<paramref name="destination"/>' and ''<paramref name="parserContext"/>' cannot be null. </exception>
        public void Parse(Object destination, IParserContext parserContext)
        {
            if (destination == null)
            {
                throw new ArgumentNullException(nameof(destination));
            }

            if (parserContext == null)
            {
                throw new ArgumentNullException(nameof(parserContext));
            }

            parserContext.CreateMaps(destination);
            this.queryficationBuilder.Parse(parserContext);
        }