Exemplo n.º 1
0
 public void WriteLine(WriteCursor writeCursor)
 {
     writeCursor.WriteLine(
         (IsStatic ? "static " : "") +
         Name +
         "(" +
         string.Join(", ", Parameters.Select(x => x.Name + ": " + x.Type.FullName)) + ")" +
         (Return == null ? "" : ": " + Return.FullName)
         +";");
 }
Exemplo n.º 2
0
        public override void Write(WriteCursor writeCursor)
        {
            var export = Parent.Name == string.Empty ? "export declare " : "";

            writeCursor.StartBlock(export + "enum " + Name);

            foreach (var value in Values)
            {
                writeCursor.WriteLine(value.Name + " = " + value.Value + ",");
            }

            writeCursor.EndBlock();
        }
Exemplo n.º 3
0
 public override void Write(WriteCursor writeCursor)
 {
     ArrayType.Write(writeCursor);
     writeCursor.Write("[]");
 }
Exemplo n.º 4
0
        public override void Write(WriteCursor writeCursor)
        {
            if (ReferenceOnly)
                return;

            if (Name != string.Empty)
            {
                writeCursor.StartBlock("export" +
                    (writeCursor.IsTopLevel ? " declare" : "") +
                    " module " +
                    Name);
            }

            foreach (var module in Modules)
            {
                module.Write(writeCursor);
            }

            foreach (var tsType in Types)
            {
                tsType.Write(writeCursor);
            }

            if (Name != string.Empty)
            {
                writeCursor.EndBlock();
            }
        }
Exemplo n.º 5
0
 public abstract void Write(WriteCursor writeCursor);
Exemplo n.º 6
0
 public override void Write(WriteCursor writeCursor)
 {
     writeCursor.Write(Name);
 }
Exemplo n.º 7
0
 public static void Write(StreamWriter streamWriter, TypeScript.Module module)
 {
     var writeCursor = new WriteCursor(streamWriter);
     module.Write(writeCursor);
 }
Exemplo n.º 8
0
 public void WriteLine(WriteCursor writeCursor)
 {
     writeCursor.WriteLine(Name + ": " + TsType.FullName + ";");
 }
Exemplo n.º 9
0
 public new void WriteLine(WriteCursor writeCursor)
 {
     writeCursor.WriteLine("constructor (" + string.Join(", ", Parameters.Select(x => x.Name + ": " + x.Type.FullName)) + ");");
 }
Exemplo n.º 10
0
 public override void Write(WriteCursor writeCursor)
 {
     writeCursor.WriteLine("undefined");
 }