private List <object> Convert(string code)
        {
            BasicConverter converter          = new BasicConverter(LanguageType.VisualBasic, StorageFactory.CreateStandard());
            CodeTypeDeclarationCollection ctd = converter.ConvertNativeCodeToCodeDom(code, new PInvoke.ErrorProvider());
            CodeDomIterator it = new CodeDomIterator();

            return(it.Iterate(ctd));
        }
Example #2
0
        private static CodeTypeDeclarationCollection ConvertToCodeDom(string code)
        {
            ErrorProvider  ep  = new ErrorProvider();
            BasicConverter con = new BasicConverter(LanguageType.VisualBasic, StorageFactory.CreateStandard());
            CodeTypeDeclarationCollection result = con.ConvertNativeCodeToCodeDom(code, ep);

            Assert.Equal(0, ep.Errors.Count);
            return(result);
        }