Ejemplo n.º 1
0
        private string ToDeclaration(ProgrammingLanguage language, AnalyzedStepParameter parameter)
        {
            switch (language)
            {
            case ProgrammingLanguage.VB:
                return(String.Format("ByVal {0} As {1}", parameter.Name, parameter.Type));

            case ProgrammingLanguage.CSharp:
                return(String.Format("{1} {0}", parameter.Name, GetCSharpTypeName(parameter.Type)));

            case ProgrammingLanguage.FSharp:
                return(String.Format("{0} : {1}", parameter.Name, GetFSharpTypeName(parameter.Type)));

            default:
                return(String.Format("{1} {0}", parameter.Name, parameter.Type));
            }
        }
 private string ToDeclaration(ProgrammingLanguage language, AnalyzedStepParameter parameter)
 {
     switch (language)
     {
         case ProgrammingLanguage.VB:
             return String.Format("ByVal {0} As {1}", parameter.Name, parameter.Type);
         case ProgrammingLanguage.CSharp:
             return String.Format("{1} {0}", parameter.Name, GetCSharpTypeName(parameter.Type));
         case ProgrammingLanguage.FSharp:
             return String.Format("{0} : {1}", parameter.Name, GetFSharpTypeName(parameter.Type));
         default:
             return String.Format("{1} {0}", parameter.Name, parameter.Type);
     }
 }