~halega/+junk/sharpdevelop

« back to all changes in this revision

Viewing changes to samples/CodeConverter/Source/ICSharpCode.CodeConversion/PythonHelpers.cs

  • Committer: sk
  • Date: 2011-09-10 05:17:57 UTC
  • Revision ID: halega@halega.com-20110910051757-qfouz1llya9m6boy
4.1.0.7915 Release Candidate 1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
using System;
 
2
using System.Collections.Generic;
 
3
using System.Linq;
 
4
using System.Text;
 
5
 
 
6
using ICSharpCode.NRefactory;
 
7
using ICSharpCode.PythonBinding;
 
8
 
 
9
namespace ICSharpCode.CodeConversion
 
10
{
 
11
    public class PythonHelpers
 
12
    {
 
13
        public static bool Convert(SupportedLanguage inputLanguage, string ProvidedSource, out string ConvertedSource, out string ErrorMessage)
 
14
        {
 
15
            NRefactoryToPythonConverter converter = new
 
16
                    NRefactoryToPythonConverter(inputLanguage);
 
17
 
 
18
            string convertedCode = converter.Convert(ProvidedSource);
 
19
 
 
20
            ConvertedSource = convertedCode;
 
21
            ErrorMessage = "";
 
22
 
 
23
            return true;
 
24
        }
 
25
    }
 
26
}