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));
            }));
        }
        public void ReadFile(string file, IPackageLog log)
        {
            var reader = new AssetDslReader(_assets);
            log.Trace("  Reading script directives from {0}", file);
            log.TrapErrors(() =>
            {
                _fileSystem.ReadTextFile(file, text =>
                {
                    if (text.Trim().IsEmpty()) return;

                    log.TrapErrors(() => reader.ReadLine(text));
                });
            });
        }
        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));
            }));
        }
        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));
            }));
        }
        public void ReadFile(string provenance, string file, IPackageLog log)
        {
            _diagnostics.SetCurrentProvenance(provenance);
            var reader = new SparkDslReader(_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));
            }));
        }
 public void Precompile(IPackageLog log)
 {
     Parallel.ForEach(nonNativePartialDescriptors(), vd=> log.TrapErrors(() => {
         var def = vd.ToViewDefinition();
         _providerCache.GetViewEntry(def.ViewDescriptor);
         _providerCache.GetViewEntry(def.PartialDescriptor);
     }));
 }
        public void ReadFile(string file, IPackageLog log)
        {
            _diagnostics.SetCurrentProvenance(file);
            var reader = new AssetDslReader(_diagnostics);
            _configurationFiles.Fill(file.ToFullPath());

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

                    log.TrapErrors(() => reader.ReadLine(text));
                });
            });
        }
Exemple #8
0
 public void Precompile(IPackageLog log)
 {
     nonNativePartialDescriptors().Each(vd => log.TrapErrors(() => {
         var def = vd.ToViewDefinition();
         _providerCache.GetViewEntry(def.ViewDescriptor);
         _providerCache.GetViewEntry(def.PartialDescriptor);
     }));
 }
Exemple #9
0
        public void ReadFile(string file, IPackageLog log)
        {
            var reader = new ScriptDslReader(_scripts);

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

                    log.TrapErrors(() => reader.ReadLine(text));
                });
            });
        }
Exemple #10
0
        public void ReadFile(string file, IPackageLog log)
        {
            _diagnostics.SetCurrentProvenance(file);
            var reader = new AssetDslReader(_diagnostics);

            _configurationFiles.Fill(file.ToFullPath());

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

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