Beispiel #1
0
        public override List <string> GetAsListOfStrings()
        {
            List <string> output = new List <string>();

            // Since this is a class...we need to get the signature of the class...
            output.Add(model.GetSignature());
            // Opening class brace
            output.Add("{");
            if (model.Methods != null)
            {
                foreach (MethodModel method in model.Methods)
                {
                    // Method signature and empty method body
                    output.Add(method.ToString());
                    output.Add("{");
                    output.Add("}");
                }
            }
            else if (model.Variables != null)
            {
                foreach (VariableModel variable in model.Variables)
                {
                    output.Add(variable.ToString());
                }
            }
            // Closing class brace
            output.Add("}");
            return(output);
        }
Beispiel #2
0
        public override List <string> GetAsListOfStrings()
        {
            List <string> output = new List <string>();

            // Since this is a interface, we simple add each method signature and a semicolon, on one line.
            output.Add(model.GetSignature());
            // Opening interface brace
            output.Add("{");
            foreach (MethodModel method in model.Methods)
            {
                // Method signature and semicolon
                output.Add(method.ToString() + ";");
            }
            // Closing interface brace
            output.Add("}");
            return(output);
        }