Revision 6b0de454 trunk/Pithos.Core/Agents/FileEventIdleBatch.cs
b/trunk/Pithos.Core/Agents/FileEventIdleBatch.cs | ||
---|---|---|
41 | 41 |
#endregion |
42 | 42 |
using System; |
43 | 43 |
using System.Collections.Generic; |
44 |
using System.Diagnostics.Contracts; |
|
44 | 45 |
using System.IO; |
45 | 46 |
using System.Linq; |
46 | 47 |
using System.Reflection; |
... | ... | |
71 | 72 |
|
72 | 73 |
public void Post(FileSystemEventArgs arg) |
73 | 74 |
{ |
75 |
if (arg is RenamedEventArgs) |
|
76 |
throw new ArgumentException("arg"); |
|
77 |
Contract.EndContractBlock(); |
|
74 | 78 |
if (Log.IsDebugEnabled) |
75 | 79 |
Log.DebugFormat("Batch Post {0}:{1}", arg.ChangeType.ToString("g"), arg.FullPath); |
76 | 80 |
|
... | ... | |
93 | 97 |
dict[arg.FullPath] = new[] { arg }; |
94 | 98 |
else if (arg.ChangeType == WatcherChangeTypes.Renamed) |
95 | 99 |
{ |
96 |
var renamedArg = (RenamedEventArgs)arg;
|
|
100 |
var renamedArg = (MovedEventArgs)arg;
|
|
97 | 101 |
FileSystemEventArgs[] oldValue; |
98 | 102 |
if (dict.TryGetValue(renamedArg.OldFullPath, out oldValue)) |
99 | 103 |
{ |
Also available in: Unified diff