public override void Write(MethodModifier modifier)
        {
            var writer = this.TextWriter;

            if (modifier.AccessModifier != MethodAccessModifier.None)
            {
                this.Write(modifier.AccessModifier);
                writer.Write(" ");
            }

            if (modifier.Static == true)
            {
                writer.Write("static ");
            }
            else
            {
                switch (modifier.Polymophism)
                {
                case MethodPolymophism.None: break;

                case MethodPolymophism.Abstract: writer.Write("abstract "); break;

                case MethodPolymophism.Virtual: writer.Write("virtual "); break;

                case MethodPolymophism.Override: writer.Write("override "); break;

                case MethodPolymophism.New: writer.Write("new "); break;

                default: throw new InvalidOperationException();
                }
            }
        }
Example #2
0
        public static String Write(SourceCodeLanguage language, MethodModifier modifier)
        {
            var sc = Create(language);

            sc.Write(modifier);
            return(sc.TextWriter.ToString());
        }
 public override void Write(MethodModifier modifier)
 {
     throw new NotImplementedException();
 }
Example #4
0
 public abstract void Write(MethodModifier modifier);
 public override void Write(MethodModifier modifier)
 {
     throw new NotImplementedException();
 }
Example #6
0
 public abstract void Write(MethodModifier modifier);
Example #7
0
 public static String Write(SourceCodeLanguage language, MethodModifier modifier)
 {
     var sc = Create(language);
     sc.Write(modifier);
     return sc.TextWriter.ToString();
 }