예제 #1
0
        public void CloseMethod()
        {
            var t = openedTags.Peek();
            CodeMethodBlockInfo methodInfo = t.meta as CodeMethodBlockInfo;

            if (methodInfo != null)
            {
                if (methodInfo.HasReturnType)
                {
                    AppendLine("return output;");
                }
            }

            t = close(CodeBlockType.methodBlock);
        }
예제 #2
0
        public void OpenMethod(CodeMethodBlockInfo methodInfo)
        {
            String methodLine = methodInfo.methodAccess + " " + methodInfo.returnType + " " + methodInfo.methodName + "(";

            foreach (var pair in methodInfo.parameters)
            {
                methodLine = methodLine.add(pair.Key.Name + " " + pair.Value, ", ");
            }
            methodLine += ")";

            var t = open(CodeBlockType.methodBlock, methodLine, methodInfo.methodDescription);

            t.meta = methodInfo;



            if (methodInfo.HasReturnType)
            {
                AppendLine(methodInfo.returnType + " output = default(" + methodInfo.returnType + ");");
            }
        }