Пример #1
0
        public static CSharpCompilation Convert(string text, CSharpConverterOptions options)
        {
            if (text == null)
            {
                throw new ArgumentNullException(nameof(text));
            }
            if (options == null)
            {
                throw new ArgumentNullException(nameof(options));
            }

            var converter = new CSharpConverter(options);

            return(converter.Run(parserOptions => CppParser.Parse(text, parserOptions)));
        }
Пример #2
0
        public static CSharpCompilation Convert(List <string> files, CSharpConverterOptions options)
        {
            if (files == null)
            {
                throw new ArgumentNullException(nameof(files));
            }
            if (options == null)
            {
                throw new ArgumentNullException(nameof(options));
            }

            var converter = new CSharpConverter(options);

            return(converter.Run(parserOptions => CppParser.ParseFiles(files, parserOptions)));
        }