tesses-vfs-extras/Tesses.VirtualFilesystem.Ov.../DoubleWatcher.cs

95 lines
2.7 KiB
C#

using System;
using System.IO;
namespace Tesses.VirtualFilesystem.Filesystems
{
internal class DoubleWatcher : IVirtualWatcher
{
public DoubleWatcher(IVirtualWatcher left,IVirtualWatcher right)
{
Left = left;
Right = right;
}
public int InternalBufferSize { get => Left.InternalBufferSize; set {
Left.InternalBufferSize = value;
Right.InternalBufferSize=value;
} }
public NotifyFilters NotifyFilter {
get => Left.NotifyFilter;
set{
Left.NotifyFilter=value;
Right.NotifyFilter=value;
}
}
public bool EnableRaisingEvents { get => Left.EnableRaisingEvents; set {
Left.EnableRaisingEvents=value; Right.EnableRaisingEvents=value;
} }
public string Filter { get => Left.Filter; set {
Left.Filter=value;
Right.Filter = value;
}}
public bool IncludeSubdirectories { get => Left.IncludeSubdirectories; set {
Left.IncludeSubdirectories=value;
Right.IncludeSubdirectories=value;
}}
public IVirtualWatcher Left { get; }
public IVirtualWatcher Right { get; }
public event EventHandler<VirtualWatcherChangedArgs> Changed
{
add {
Left.Changed+=value;
Right.Changed+=value;
}
remove {
Left.Changed-=value;
Right.Changed-=value;
}
}
public event EventHandler<VirtualWatcherChangedArgs> Created
{
add{
Left.Created+=value;
Right.Created+=value;
}
remove{
Left.Created -= value;
Right.Created-=value;
}
}
public event EventHandler<VirtualWatcherChangedArgs> Deleted
{
add{
Left.Deleted+=value;
Right.Deleted+=value;
}
remove{
Left.Deleted-=value;
Right.Deleted-=value;
}
}
public event EventHandler<VirtualWatcherRenamedEventArgs> Renamed
{
add{
Left.Renamed +=value;
Right.Renamed+=value;
}
remove{
Left.Renamed -=value;
Right.Renamed-=value;
}
}
public event EventHandler<ErrorEventArgs> Error
{
add{
Left.Error += value;
Right.Error += value;
}
remove{
Left.Error -= value;
Right.Error -= value;
}
}
}
}