Exemplo n.º 1
0
 public void InstallSources(string[] interchangeCode, IInterchangeErrorSink parseErrorSink, IInstallErrorSink installErrorSink)
 {
     this.CompleteInstall(this.ReadSources(interchangeCode, parseErrorSink), installErrorSink);
 }
Exemplo n.º 2
0
 public void InstallFiles(string[] paths, IInterchangeErrorSink parseErrorSink, IInstallErrorSink installErrorSink)
 {
     this.CompleteInstall(this.ReadFiles(paths, parseErrorSink), installErrorSink);
 }
Exemplo n.º 3
0
 public void InstallSource(string interchangeCode, IInterchangeErrorSink parseErrorSink, IInstallErrorSink installErrorSink)
 {
     this.InstallSources(new string[] { interchangeCode }, parseErrorSink, installErrorSink);
 }
Exemplo n.º 4
0
 public void InstallFile(string path, IInterchangeErrorSink parseErrorSink, IInstallErrorSink installErrorSink)
 {
     this.InstallFiles(new string[] { path }, parseErrorSink, installErrorSink);
 }
Exemplo n.º 5
0
        public InterchangeInstallerContext ReadSources(string[] interchangeCode, IInterchangeErrorSink errorSink)
        {
            if (interchangeCode == null)
                throw new ArgumentNullException("interchangeCode");

            InterchangeInstallerContext installer = this.CreateInstallerContext();

            foreach (string code in interchangeCode)
            {
                InterchangeFormatProcessor processor = new InterchangeFormatProcessor(new StringReader(code), installer, this.VersionServicesMap);
                processor.ErrorSink = errorSink;
                processor.ProcessInterchangeFile();
            }

            return installer;
        }
Exemplo n.º 6
0
 public InterchangeInstallerContext ReadSource(string interchangeCode, IInterchangeErrorSink errorSink)
 {
     return this.ReadSources(new string[] { interchangeCode }, errorSink);
 }
Exemplo n.º 7
0
        public InterchangeInstallerContext ReadFiles(string[] paths, IInterchangeErrorSink errorSink)
        {
            if (paths == null)
                throw new ArgumentNullException("paths");

            InterchangeInstallerContext installer = this.CreateInstallerContext();

            foreach (string path in paths)
            {
                // Issue - expects UTF-8 encoding
                using (StreamReader sourceFileReader = File.OpenText(path))
                {
                    InterchangeFormatProcessor processor = new InterchangeFormatProcessor(sourceFileReader, installer, this.VersionServicesMap);
                    processor.ErrorSink = errorSink;
                    processor.ProcessInterchangeFile();
                }
            }

            return installer;
        }
Exemplo n.º 8
0
 public InterchangeInstallerContext ReadFile(string path, IInterchangeErrorSink errorSink)
 {
     return this.ReadFiles(new string[] { path }, errorSink);
 }