コード例 #1
0
ファイル: FileChangeWatcher.cs プロジェクト: mpeyrotc/roslyn
            private WatcherOperation(Kind kind)
            {
                Contract.ThrowIfFalse(kind is Kind.None);
                _kind = kind;

                // Other watching fields are not used for this kind
                _directory       = null !;
                _filter          = null;
                _fileChangeFlags = 0;
                _sink            = null !;
                _cookies         = null !;
                _token           = null !;
                _tokens          = null !;
            }
コード例 #2
0
ファイル: FileChangeWatcher.cs プロジェクト: mpeyrotc/roslyn
            private WatcherOperation(Kind kind, IEnumerable <Context.FileWatchingToken> tokens)
            {
                Contract.ThrowIfFalse(kind is Kind.UnwatchFiles);
                _kind = kind;

                _tokens = tokens;

                // Other watching fields are not used for this kind
                _directory       = null !;
                _filter          = null;
                _fileChangeFlags = 0;
                _sink            = null !;
                _cookies         = null !;
                _token           = null !;
            }
コード例 #3
0
ファイル: FileChangeWatcher.cs プロジェクト: mpeyrotc/roslyn
            private WatcherOperation(Kind kind, string path, _VSFILECHANGEFLAGS fileChangeFlags, IVsFreeThreadedFileChangeEvents2 sink, Context.FileWatchingToken token)
            {
                Contract.ThrowIfFalse(kind is Kind.WatchFile);
                _kind = kind;

                _directory       = path;
                _fileChangeFlags = fileChangeFlags;
                _sink            = sink;
                _token           = token;

                // Other watching fields are not used for this kind
                _filter  = null;
                _cookies = null !;
                _tokens  = null !;
            }
コード例 #4
0
ファイル: FileChangeWatcher.cs プロジェクト: mpeyrotc/roslyn
            private WatcherOperation(Kind kind, string directory, string?filter, IVsFreeThreadedFileChangeEvents2 sink, List <uint> cookies)
            {
                Contract.ThrowIfFalse(kind is Kind.WatchDirectory);
                _kind = kind;

                _directory = directory;
                _filter    = filter;
                _sink      = sink;
                _cookies   = cookies;

                // Other watching fields are not used for this kind
                _fileChangeFlags = 0;
                _token           = null !;
                _tokens          = null !;
            }
コード例 #5
0
ファイル: FileChangeWatcher.cs プロジェクト: mpeyrotc/roslyn
 public static WatcherOperation WatchFile(string path, _VSFILECHANGEFLAGS fileChangeFlags, IVsFreeThreadedFileChangeEvents2 sink, Context.FileWatchingToken token)
 => new(Kind.WatchFile, path, fileChangeFlags, sink, token);