DirectoryScanJob and IDirectoryScanListener Samples #1667
Replies: 6 comments
-
The documentation is here and lacking the examples like you've said. PRs are always welcome. |
Beta Was this translation helpful? Give feedback.
-
And the configuration is set as follows:
However, I am not sure to specify a simple scheduler with trigger and the example above doesn't work anyway. |
Beta Was this translation helpful? Give feedback.
-
Can someone help me implement this sample please? |
Beta Was this translation helpful? Give feedback.
-
Did you get the |
Beta Was this translation helpful? Give feedback.
-
Unfortunately, I couldn't run it... |
Beta Was this translation helpful? Give feedback.
-
Can be me but it took me a while and all the internet, multiple ChatGPT session and my own thoughts, so I will share a version that works for me. hopefully it will help someone. Programs.cs (web/api/console project): DependencyInjection.cs (infrastructure project) :
} DirectoryProvider.cs (infrastructure project):
} DirectoryScanListenerConfigurator.cs (infrastructure project):
make the rest of the functions that are created by the ISchedulerListener return => Task.CompletedTask; DirectoryScanListener.cs (infrastructure project):
} Keep in mind that only newly created files work, only those are pickedup (need to have a creation time newer then the start time of the IDirectoryScanListener) When (re)starting the IDirectoryScanListener, then is show the existing file in the folder that is scanned. If you have questions, just ask. King regards, |
Beta Was this translation helpful? Give feedback.
-
I haven't found any examples on the internet yet. Are you considering adding any wiki or examples on how DirectoryScanJob works and how IDirectoryScanListener can implement?
Beta Was this translation helpful? Give feedback.
All reactions