<commit_before>﻿#if !NETSTANDARD1_3
using System;
using System.Collections.Concurrent;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Threading;
using JetBrains.Annotations;
using TestableFileSystem.Interfaces;

namespace TestableFileSystem.Fakes
{
    public sealed class FakeFileSystemWatcher : IFileSystemWatcher
    {
        private const int MinBufferSize = 4096;

        private const int AverageRelativeFileNameLengthInChars = 50;
        private const int AverageRelativeFileNameLengthInBytes = AverageRelativeFileNameLengthInChars * 2;
        private const int FileNotifyInformationStructSizeInBytes = 6;
        private const int NumBytesPerChange = FileNotifyInformationStructSizeInBytes + AverageRelativeFileNameLengthInBytes;

        private static readonly WaitForChangedResult WaitForChangeTimedOut = new WaitForChangedResult
        {
            TimedOut = true
        };

        [NotNull]
        private readonly FakeFileSystem owner;

        [NotNull]
        private readonly FakeFileSystemChangeTracker changeTracker;
<commit_msg>Fixed calculation of watcher message size<commit_after>﻿#if !NETSTANDARD1_3
using System;
using System.Collections.Concurrent;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Threading;
using JetBrains.Annotations;
using TestableFileSystem.Interfaces;

namespace TestableFileSystem.Fakes
{
    public sealed class FakeFileSystemWatcher : IFileSystemWatcher
    {
        private const int MinBufferSize = 4096;

        private const int AverageRelativeFileNameLengthInChars = 50;
        private const int AverageRelativeFileNameLengthInBytes = AverageRelativeFileNameLengthInChars * 2;
        private const int DWordSizeInBytes = 32 / 8;
        private const int NumBytesPerChange = 3 * DWordSizeInBytes + AverageRelativeFileNameLengthInBytes;

        private static readonly WaitForChangedResult WaitForChangeTimedOut = new WaitForChangedResult
        {
            TimedOut = true
        };

        [NotNull]
        private readonly FakeFileSystem owner;

        [NotNull]
        private readonly FakeFileSystemChangeTracker changeTracker;

{'fraction_non_alphanumeric': 0.04601932811780948, 'fraction_numerical': 0.01058444546709618, 'mean_word_length': 3.929705215419501, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7569837', 'n_tokens_mistral': 560, 'n_tokens_neox': 534, 'n_words': 149}