20 public string[] Items =
Array.Empty<
string>();
35 string[]
array = (
string[])Items.Clone();
41 public int Count => Items.Length;
52 Items =
Array.Empty<
string>();
78 string[]
array =
new string[items.Length + 1];
93 string[]
array =
new string[items.Length - 1];
284 [
Editor(
"System.Diagnostics.Design.FSWPathEditor, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a",
"System.Drawing.Design.UITypeEditor, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
296 if (
value.Length == 0)
319 if (
Site !=
null &&
Site.DesignMode)
364 public event ErrorEventHandler?
Error
449 if (
path.Length == 0)
658 if (!
tcs.Task.IsCompletedSuccessfully)
662 return tcs.Task.Result;
704 return base.DesignMode;
790 ptr =
state.ThreadPoolBinding.AllocateNativeOverlapped(
state.PreAllocatedOverlapped);
806 state.ThreadPoolBinding.FreeNativeOverlapped(
ptr);
808 state.PreAllocatedOverlapped.Dispose();
809 state.ThreadPoolBinding.Dispose();
858 while (
sizeof(global::Interop.Kernel32.FILE_NOTIFY_INFORMATION) <= (uint)
buffer.Length)
861 if (
reference.FileNameLength > (uint)buffer.Length -
sizeof(global::Interop.Kernel32.FILE_NOTIFY_INFORMATION))
868 case global::Interop.Kernel32.FileAction.FILE_ACTION_RENAMED_OLD_NAME:
871 case global::Interop.Kernel32.FileAction.FILE_ACTION_RENAMED_NEW_NAME:
883 case global::Interop.Kernel32.FileAction.FILE_ACTION_ADDED:
886 case global::Interop.Kernel32.FileAction.FILE_ACTION_REMOVED:
889 case global::Interop.Kernel32.FileAction.FILE_ACTION_MODIFIED:
static unsafe SafeFileHandle CreateFile(string fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
int IList. IndexOf(object value)
void CopyTo(KeyValuePair< TKey, TValue >[] array, int index)
readonly IList< T > items
static ? Delegate Remove(Delegate? source, Delegate? value)
static ? Delegate Combine(Delegate? a, Delegate? b)
static bool Exists([NotNullWhen(true)] string? path)
static bool MatchesSimpleExpression(ReadOnlySpan< char > expression, ReadOnlySpan< char > name, bool ignoreCase=true)
WatcherChangeTypes ChangeType
AsyncReadState(int session, byte[] buffer, SafeFileHandle handle, ThreadPoolBoundHandle binding, FileSystemWatcher parent)
SafeFileHandle DirectoryHandle
WeakReference< FileSystemWatcher > WeakWatcher
ThreadPoolBoundHandle ThreadPoolBinding
IEnumerator< string > GetEnumerator()
void Insert(int index, string item)
void CopyTo(string[] array, int arrayIndex)
bool Contains(string item)
override void SetItem(int index, string item)
NormalizedFilterCollection()
override void InsertItem(int index, string item)
FileSystemEventHandler _onCreatedHandler
void OnError(ErrorEventArgs e)
Collection< string > Filters
void OnCreated(FileSystemEventArgs e)
FileSystemWatcher(string path)
ErrorEventHandler _onErrorHandler
void NotifyFileSystemEventArgs(WatcherChangeTypes changeType, ReadOnlySpan< char > name)
WaitForChangedResult WaitForChanged(WatcherChangeTypes changeType, int timeout)
FileSystemEventHandler _onChangedHandler
unsafe void ParseEventBufferAndNotifyForEach(ReadOnlySpan< byte > buffer)
bool IncludeSubdirectories
FileSystemEventHandler? Changed
readonly NormalizedFilterCollection _filters
unsafe void Monitor(AsyncReadState state)
FileSystemEventHandler _onDeletedHandler
void NotifyRenameEventArgs(WatcherChangeTypes action, ReadOnlySpan< char > name, ReadOnlySpan< char > oldName)
void InvokeOn(FileSystemEventArgs e, FileSystemEventHandler handler)
void OnRenamed(RenamedEventArgs e)
FileSystemEventHandler? Created
static void CheckPathValidity(string path)
WaitForChangedResult WaitForChanged(WatcherChangeTypes changeType)
NotifyFilters _notifyFilters
FileSystemEventHandler? Deleted
FileSystemEventHandler GetHandler(WatcherChangeTypes changeType)
void OnChanged(FileSystemEventArgs e)
NotifyFilters NotifyFilter
bool _includeSubdirectories
void OnDeleted(FileSystemEventArgs e)
unsafe void StartRaisingEvents()
FileSystemWatcher(string path, string filter)
SafeFileHandle _directoryHandle
void StartRaisingEventsIfNotDisposed()
override void Dispose(bool disposing)
bool MatchPattern(ReadOnlySpan< char > relativePath)
RenamedEventHandler _onRenamedHandler
RenamedEventHandler? Renamed
static bool IsHandleInvalid([NotNullWhen(false)] SafeFileHandle handle)
ISynchronizeInvoke? SynchronizingObject
void ReadDirectoryChangesCallback(uint errorCode, uint numBytes, AsyncReadState state)
void NotifyInternalBufferOverflowEvent()
static bool IsCaseSensitive
static StringComparison StringComparison
static ? string GetFileName(string? path)
static string InvalidEnumArgument
static string BufferSizeTooLarge
static string Format(string resourceFormat, object p1)
static string InvalidDirName
static string FSW_BufferOverflow
static string InvalidDirName_NotExists
static string FSW_IOError
static int Increment(ref int location)
static ThreadPoolBoundHandle BindHandle(SafeHandle handle)
static unsafe? object GetNativeOverlappedState(NativeOverlapped *overlapped)
static bool Read(ref bool location)
new IEnumerator< T > GetEnumerator()
delegate void ErrorEventHandler(object sender, ErrorEventArgs e)
delegate void RenamedEventHandler(object sender, RenamedEventArgs e)
delegate void FileSystemEventHandler(object sender, FileSystemEventArgs e)
static readonly WaitForChangedResult TimedOutResult