コード例 #1
0
        public void ReadConfig(IFubuFile config, IPackageLog log)
        {
            _diagnostics.SetCurrentProvenance(config.Provenance);
            var reader = new SharingDslReader(_diagnostics);

            log.Trace("  Reading sharing directives from {0}", config.ToString());
            log.TrapErrors(() => config.ReadLines(text =>
            {
                if (text.Trim().IsEmpty()) return;
                log.TrapErrors(() => reader.ReadLine(text, config.Provenance));
            }));
        }
コード例 #2
0
        public void ReadConfig(IFubuFile config, IPackageLog log)
        {
            _diagnostics.SetCurrentProvenance(config.Provenance);
            var reader = new SharingDslReader(_diagnostics);

            log.Trace("  Reading sharing directives from {0}", config.ToString());
            log.TrapErrors(() => config.ReadLines(text =>
            {
                if (text.Trim().IsEmpty())
                {
                    return;
                }
                log.TrapErrors(() => reader.ReadLine(text, config.Provenance));
            }));
        }
コード例 #3
0
        public void ReadFile(string provenance, string file, IPackageLog log)
        {
            _diagnostics.SetCurrentProvenance(provenance);
            var reader = new SharingDslReader(_diagnostics);

            log.Trace("  Reading spark directives from {0}", file);
            log.TrapErrors(() => _fileSystem.ReadTextFile(file, text =>
            {
                if (text.Trim().IsEmpty())
                {
                    return;
                }

                log.TrapErrors(() => reader.ReadLine(text, provenance));
            }));
        }