public override IEnumerable <ProjectedDirectoryEntry> EnumerateDirectory(string relativePath, string searchPattern) { Console.WriteLine($"Enumerating: '{relativePath}' (search pattern: {searchPattern})"); if (string.IsNullOrEmpty(relativePath)) { yield return(new ProjectedDirectoryEntry("a", FileBasicInfo.File(_FileContent.Length, DateTime.Now, DateTime.Now, DateTime.Now, DateTime.Now))); yield return(new ProjectedDirectoryEntry("b", FileBasicInfo.File(_FileContent.Length, DateTime.Now, DateTime.Now, DateTime.Now, DateTime.Now))); yield return(new ProjectedDirectoryEntry("c", FileBasicInfo.Directory(DateTime.Now, DateTime.Now, DateTime.Now, DateTime.Now))); } else { yield return(new ProjectedDirectoryEntry("d", FileBasicInfo.File(_FileContent.Length, DateTime.Now, DateTime.Now, DateTime.Now, DateTime.Now))); } }
public override bool TryGetPlaceholderInfo(string relativePath, TriggeringProcessContext triggeringProcess, out PlaceholderInfo placeholderInfo) { Console.WriteLine($"Get Placeholder for: '{relativePath}' (from {triggeringProcess.Process.ProcessName}:{triggeringProcess.ProcessId})"); switch (relativePath) { case "a": placeholderInfo = new PlaceholderInfo(FileBasicInfo.File(_FileContent.Length, DateTime.Now, DateTime.Now, DateTime.Now, DateTime.Now)); return(true); case "b": placeholderInfo = new PlaceholderInfo(FileBasicInfo.File(_FileContent.Length, DateTime.Now, DateTime.Now, DateTime.Now, DateTime.Now)); return(true); case "c": placeholderInfo = new PlaceholderInfo(FileBasicInfo.Directory(DateTime.Now, DateTime.Now, DateTime.Now, DateTime.Now)); return(true); default: placeholderInfo = null; return(false); } }