예제 #1
0
 /// <summary> Initializes comparison from any two entries. </summary>
 /// <param name="left">Left entry.</param>
 /// <param name="right">Right entry.</param>
 /// <returns>true if comparison of two entries by this trait can be performed; false otherwise.</returns>
 protected override bool InitFromEntries(Entry left, Entry right)
 {
     LeftSize = left.Size;
     RightSize = right.Size;
     return true;
 }
예제 #2
0
 /// <summary> Initializes comparison from any two entries. </summary>
 /// <param name="left">Left entry.</param>
 /// <param name="right">Right entry.</param>
 /// <returns>true if comparison of two entries by this trait can be performed; false otherwise.</returns>
 protected virtual bool InitFromEntries(Entry left, Entry right)
 {
     return false;
 }
 /// <summary> Initializes comparison from any two entries. </summary>
 /// <param name="left">Left entry.</param>
 /// <param name="right">Right entry.</param>
 /// <returns>true if comparison of two entries by this trait can be performed; false otherwise.</returns>
 protected override bool InitFromEntries(Entry left, Entry right)
 {
     LeftParent = left.ParentFolder;
     RightParent = right.ParentFolder;
     return true;
 }
 /// <summary> Initializes comparison from any two entries. </summary>
 /// <param name="left">Left entry.</param>
 /// <param name="right">Right entry.</param>
 /// <returns>true if comparison of two entries by this trait can be performed; false otherwise.</returns>
 protected override bool InitFromEntries(Entry left, Entry right)
 {
     LeftLastModified = left.LastModified;
     RightLastModified = right.LastModified;
     return true;
 }
예제 #5
0
 /// <summary> Initializes comparison from any two entries. </summary>
 /// <param name="left">Left entry.</param>
 /// <param name="right">Right entry.</param>
 /// <returns>true if comparison of two entries by this trait can be performed; false otherwise.</returns>
 protected override bool InitFromEntries(Entry left, Entry right)
 {
     LeftEntryType = Entry.Type(left);
     RightEntryType = Entry.Type(right);
     return true;
 }
예제 #6
0
파일: Entry.cs 프로젝트: EnoughTea/arcomp
        /// <summary> Finds proeprty differences between entries. </summary>
        /// <param name="left">'Left' entry.</param>
        /// <param name="right">'Right' entry.</param>
        public static IEnumerable<EntryTraitDifference> PropertiesDiff(Entry left, Entry right)
        {
            Contract.Requires(left != null);
            Contract.Requires(right != null);

            return Comparisons
                .Select(cmpType => (EntryTraitDifference)Activator.CreateInstance(cmpType, left, right))
                .Where(cmp => cmp != null && cmp.ComparisonExists && cmp.DifferenceExists);
        }
예제 #7
0
        internal void Add(Entry entry)
        {
            Contract.Requires(entry != null);

            _contents.Add(entry);
        }