Ejemplo n.º 1
0
        /// <summary>
        /// Creates a <see cref="Loom.Data.Diff"/> between this instance and the supplied <see cref="DiffBaseline"/>.
        /// </summary>
        /// <param name="baseline">The <see cref="Diff.DiffBaseline"/> to compare to this instance.</param>
        /// <returns>A <see cref="Loom.Data.Diff"/> instance representing the differences between the property values
        /// of this instance and the cached values of the <see cref="Diff.DiffBaseline"/>. </returns>
        public Diff <TDataRecord> CreateDiff(DiffBaseline baseline)
        {
            DiffGenerator <TDataRecord> diffGenerator = new DiffGenerator <TDataRecord>();

            return(diffGenerator.Generate(baseline, (TDataRecord)this));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Creates a <see cref="Loom.Data.Diff"/> between this instance and the supplied <see cref="TDataRecord"/>.
        /// </summary>
        /// <param name="other">The <see cref="TDataRecord"/> to compare to this instance.</param>
        /// <returns>
        /// A <see cref="Loom.Data.Diff"/> instance representing the differences between the
        /// property values of this instance and the supplied instance of a
        /// <see cref="DataRecord{TDataRecord}"/>
        /// </returns>
        public Diff <TDataRecord> CreateDiff(TDataRecord other)
        {
            DiffGenerator <TDataRecord> diff = new DiffGenerator <TDataRecord>();

            return(diff.Generate((TDataRecord)this, other));
        }