Ejemplo n.º 1
0
        public Compile_files(Crawl_directory_tree crawlDirTree)
        {
            var split = new Split<Tuple<string, string>, string, string>(
                t => t.Item2,
                t => t.Item1
                );

            var validatePath = new Validate<string>(
                Directory.Exists,
                path => string.Format("Diretory to be indexed not found: {0}", path)
                );

            this.in_Process = _ => split.Input(_);
            split.Output1 += validatePath.In_Validate;
            validatePath.Out_ValidData += crawlDirTree.In_Process;
            validatePath.Out_InvalidData += _ => this.Out_ValidationError(_);

            split.Output0 += _ => this.Out_IndexFilename(_);

            crawlDirTree.Out_FileFound += _ => this.Out_FileFound(_);
        }