Example #1
0
        public static MethodGenerator Method(AccessModifier scope, MethodModifier modifier, Type returnType, string name)
        {
            var method = new MethodGenerator();

            method.scope      = scope;
            method.modifier   = modifier;
            method.name       = name;
            method.returnType = returnType;
            return(method);
        }
Example #2
0
 /// <summary>
 /// Add a method to this class.
 /// </summary>
 public ClassGenerator AddMethod(MethodGenerator generator)
 {
     methods.Add(generator);
     return(this);
 }
 public StructGenerator AddMethod(MethodGenerator generator)
 {
     methods.Add(generator);
     return(this);
 }