Skip to content

Commit e13ba9d

Browse files
committed
refactor namespace and strcuture
1 parent 00a9ea9 commit e13ba9d

6 files changed

Lines changed: 31 additions & 9 deletions

File tree

v2/Demo/Form1.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11

2+
using FileWatcherEx;
3+
24
namespace Demo
35
{
46
public partial class Form1 : Form
57
{
6-
private FileWatcherEx _fw = new();
8+
private FileSystemWatcherEx _fw = new();
9+
710
public Form1()
811
{
912
InitializeComponent();
@@ -13,7 +16,7 @@ public Form1()
1316

1417
private void btnStart_Click(object sender, EventArgs e)
1518
{
16-
_fw = new FileWatcherEx(txtPath.Text.Trim());
19+
_fw = new FileSystemWatcherEx(txtPath.Text.Trim());
1720

1821
_fw.OnRenamed += FW_OnRenamed;
1922
_fw.OnCreated += FW_OnCreated;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace System.IO;
1+
namespace FileWatcherEx;
22

33
public enum ChangeType
44
{
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
using System.Collections.Concurrent;
33
using System.ComponentModel;
44

5-
namespace System.IO;
5+
namespace FileWatcherEx;
66

7-
public class FileWatcherEx : IDisposable
7+
public class FileSystemWatcherEx : IDisposable
88
{
99

1010
#region Private Properties
@@ -78,7 +78,7 @@ public class FileWatcherEx : IDisposable
7878
/// Initialize new instance of FileWatcherEx
7979
/// </summary>
8080
/// <param name="folder"></param>
81-
public FileWatcherEx(string folder = "")
81+
public FileSystemWatcherEx(string folder = "")
8282
{
8383
FolderPath = folder;
8484
}

v2/FileWatcherEx/FileWatcherEx.csproj

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,25 @@
44
<TargetFramework>net6.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
7+
<Copyright>Copyright © 2018-2022 Duong Dieu Phap</Copyright>
8+
<PackageProjectUrl>https://github.com/d2phap/FileWatcherEx</PackageProjectUrl>
9+
<PackageReadmeFile>README.md</PackageReadmeFile>
10+
<RepositoryUrl>https://github.com/d2phap/FileWatcherEx</RepositoryUrl>
11+
<RepositoryType>git</RepositoryType>
12+
<PackageTags>filewatcher, filesystemwatcher, io, filesystemevent, monitor, file-watcher, file-monitoring, realtime, file-systems, file-system-events, monitor-file-system, fs, fsevents</PackageTags>
13+
<Description>A file system watcher, used in ImageGlass project (https://imageglass.org). This project is based on the VSCode FileWatcher: https://github.com/Microsoft/vscode-filewatcher-windows.</Description>
14+
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
15+
<FileVersion>$(Version)</FileVersion>
16+
<VersionPrefix>2.0.0</VersionPrefix>
17+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
18+
<PackageReleaseNotes>Supports for normalizing RENAMED events and .NET 6.0</PackageReleaseNotes>
719
</PropertyGroup>
820

21+
<ItemGroup>
22+
<None Include="..\..\README.md">
23+
<Pack>True</Pack>
24+
<PackagePath>\</PackagePath>
25+
</None>
26+
</ItemGroup>
27+
928
</Project>

v2/FileWatcherEx/EventProcessor.cs renamed to v2/FileWatcherEx/Helpers/EventProcessor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
* Copyright (C) Microsoft Corporation. All rights reserved.
33
*--------------------------------------------------------*/
44

5-
namespace System.IO;
5+
namespace FileWatcherEx;
66

7-
class EventProcessor
7+
internal class EventProcessor
88
{
99

1010
/// <summary>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright (C) Microsoft Corporation. All rights reserved.
33
*--------------------------------------------------------*/
44

5-
namespace System.IO;
5+
namespace FileWatcherEx;
66

77

88
internal class FileWatcher : IDisposable

0 commit comments

Comments
 (0)