Пример #1
0
        public void UsnRecordEquality()
        {
            var baseValue = new UsnRecord(new FileId(123, 456), new FileId(123, 457), new Usn(789), UsnChangeReasons.DataExtend);

            StructTester.TestEquality(
                baseValue: baseValue,
                equalValue: baseValue,
                notEqualValues: new[]
            {
                new UsnRecord(new FileId(124, 456), new FileId(123, 457), new Usn(789), UsnChangeReasons.DataExtend),
                new UsnRecord(new FileId(123, 457), new FileId(123, 457), new Usn(789), UsnChangeReasons.DataExtend),
                new UsnRecord(new FileId(123, 456), new FileId(123, 457), new Usn(790), UsnChangeReasons.DataExtend),
                new UsnRecord(new FileId(123, 456), new FileId(123, 457), new Usn(790), UsnChangeReasons.DataOverwrite),
                new UsnRecord(new FileId(123, 456), new FileId(123, 458), new Usn(789), UsnChangeReasons.DataExtend)
            },
                eq: (a, b) => a == b,
                neq: (a, b) => a != b,
                skipHashCodeForNotEqualValues: false);
        }
Пример #2
0
 /// <summary>
 /// Creates an instance of <see cref="ChangedFileIdInfo" />.
 /// </summary>
 public ChangedFileIdInfo(FileIdAndVolumeId fileIdAndVolumeId, UsnRecord usnRecord)
 {
     FileIdAndVolumeId = fileIdAndVolumeId;
     UsnRecord         = usnRecord;
 }
Пример #3
0
 /// <summary>
 /// Creates an instance of <see cref="ChangedFileIdInfo" />.
 /// </summary>
 public ChangedFileIdInfo(FileIdAndVolumeId fileIdAndVolumeId, UsnRecord usnRecord, Usn?lastTrackedUsn = default)
 {
     FileIdAndVolumeId = fileIdAndVolumeId;
     UsnRecord         = usnRecord;
     LastTrackedUsn    = lastTrackedUsn;
 }