Пример #1
0
 public void InstallSources(string[] interchangeCode, IInterchangeErrorSink parseErrorSink, IInstallErrorSink installErrorSink)
 {
     this.CompleteInstall(this.ReadSources(interchangeCode, parseErrorSink), installErrorSink);
 }
Пример #2
0
 public void InstallFiles(string[] paths, IInterchangeErrorSink parseErrorSink, IInstallErrorSink installErrorSink)
 {
     this.CompleteInstall(this.ReadFiles(paths, parseErrorSink), installErrorSink);
 }
Пример #3
0
 public void InstallSource(string interchangeCode, IInterchangeErrorSink parseErrorSink, IInstallErrorSink installErrorSink)
 {
     this.InstallSources(new string[] { interchangeCode }, parseErrorSink, installErrorSink);
 }
Пример #4
0
 public void InstallFile(string path, IInterchangeErrorSink parseErrorSink, IInstallErrorSink installErrorSink)
 {
     this.InstallFiles(new string[] { path }, parseErrorSink, installErrorSink);
 }
Пример #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;
        }
Пример #6
0
 public InterchangeInstallerContext ReadSource(string interchangeCode, IInterchangeErrorSink errorSink)
 {
     return this.ReadSources(new string[] { interchangeCode }, errorSink);
 }
Пример #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;
        }
Пример #8
0
 public InterchangeInstallerContext ReadFile(string path, IInterchangeErrorSink errorSink)
 {
     return this.ReadFiles(new string[] { path }, errorSink);
 }