Example #1
0
            /// <summary>Determine the size of the object.</summary>
            /// <remarks>Determine the size of the object.</remarks>
            /// <param name="side">which side of the entry to read (OLD or NEW).</param>
            /// <param name="ent">the entry to examine.</param>
            /// <returns>the size in bytes.</returns>
            /// <exception cref="System.IO.IOException">the file cannot be accessed.</exception>
            public long Size(DiffEntry.Side side, DiffEntry ent)
            {
                switch (side)
                {
                case DiffEntry.Side.OLD:
                {
                    return(oldSource.Size(ent.oldPath, ent.oldId.ToObjectId()));
                }

                case DiffEntry.Side.NEW:
                {
                    return(newSource.Size(ent.newPath, ent.newId.ToObjectId()));
                }

                default:
                {
                    throw new ArgumentException();
                }
                }
            }