﻿// Copyright (c) Narvalo.Org. All rights reserved. See LICENSE.txt in the project root for license information.

namespace Quaderno.Xml.XDom
{
    using System.Xml.Linq;
    using Quaderno.Entities;

    public sealed class BonusReader : TransactionReader<Bonus>
    {
        public BonusReader(XElement element) : base(element)
        { }

        internal BonusReader(TransactionElement transactionElement)
            : base(transactionElement)
        { }

        protected override Bonus ReadCore() => new Bonus(ReadAmount(), ReadLocalDate());
    }
}
