1
2
3
4
5
6 using System;
7
8 namespace System.IO
9 {
10 public abstract class TextWriter
11 {
12 public virtual default ~TextWriter();
13 public abstract void Write(const string& x);
14 public abstract void Write(const wstring& x);
15 public abstract void Write(const ustring& x);
16 public abstract void Write(bool x);
17 public abstract void Write(char x);
18 public abstract void Write(wchar x);
19 public abstract void Write(uchar x);
20 public abstract void Write(sbyte x);
21 public abstract void Write(byte x);
22 public abstract void Write(short x);
23 public abstract void Write(ushort x);
24 public abstract void Write(int x);
25 public abstract void Write(uint x);
26 public abstract void Write(long x);
27 public abstract void Write(ulong x);
28 public abstract void Write(float x);
29 public abstract void Write(double x);
30 public abstract void Write(const Date& date);
31 public abstract void Write(const DateTime& dateTime);
32 public abstract void WriteLine();
33 public abstract void WriteLine(const string& x);
34 public abstract void WriteLine(const wstring& x);
35 public abstract void WriteLine(const ustring& x);
36 public abstract void WriteLine(bool x);
37 public abstract void WriteLine(sbyte x);
38 public abstract void WriteLine(byte x);
39 public abstract void WriteLine(short x);
40 public abstract void WriteLine(ushort x);
41 public abstract void WriteLine(int x);
42 public abstract void WriteLine(uint x);
43 public abstract void WriteLine(long x);
44 public abstract void WriteLine(ulong x);
45 public abstract void WriteLine(float x);
46 public abstract void WriteLine(double x);
47 public abstract void WriteLine(const Date& date);
48 public abstract void WriteLine(const DateTime& dateTime);
49 }
50
51 public TextWriter& operator<<(TextWriter& writer, const char* x)
52 {
53 writer.Write(x);
54 return writer;
55 }
56
57 public TextWriter& operator<<(TextWriter& writer, const wchar* x)
58 {
59 writer.Write(x);
60 return writer;
61 }
62
63 public TextWriter& operator<<(TextWriter& writer, const uchar* x)
64 {
65 writer.Write(x);
66 return writer;
67 }
68
69 public TextWriter& operator<<(TextWriter& writer, const string& x)
70 {
71 writer.Write(x);
72 return writer;
73 }
74
75 public TextWriter& operator<<(TextWriter& writer, const wstring& x)
76 {
77 writer.Write(x);
78 return writer;
79 }
80
81 public TextWriter& operator<<(TextWriter& writer, const ustring& x)
82 {
83 writer.Write(x);
84 return writer;
85 }
86
87 public TextWriter& operator<<(TextWriter& writer, bool x)
88 {
89 writer.Write(x);
90 return writer;
91 }
92
93 public TextWriter& operator<<(TextWriter& writer, sbyte x)
94 {
95 writer.Write(x);
96 return writer;
97 }
98
99 public TextWriter& operator<<(TextWriter& writer, byte x)
100 {
101 writer.Write(x);
102 return writer;
103 }
104
105 public TextWriter& operator<<(TextWriter& writer, short x)
106 {
107 writer.Write(x);
108 return writer;
109 }
110
111 public TextWriter& operator<<(TextWriter& writer, ushort x)
112 {
113 writer.Write(x);
114 return writer;
115 }
116
117 public TextWriter& operator<<(TextWriter& writer, int x)
118 {
119 writer.Write(x);
120 return writer;
121 }
122
123 public TextWriter& operator<<(TextWriter& writer, uint x)
124 {
125 writer.Write(x);
126 return writer;
127 }
128
129 public TextWriter& operator<<(TextWriter& writer, long x)
130 {
131 writer.Write(x);
132 return writer;
133 }
134
135 public TextWriter& operator<<(TextWriter& writer, ulong x)
136 {
137 writer.Write(x);
138 return writer;
139 }
140
141 public TextWriter& operator<<(TextWriter& writer, float x)
142 {
143 writer.Write(x);
144 return writer;
145 }
146
147 public TextWriter& operator<<(TextWriter& writer, double x)
148 {
149 writer.Write(x);
150 return writer;
151 }
152
153 public TextWriter& operator<<(TextWriter& writer, const Date& date)
154 {
155 writer.Write(date);
156 return writer;
157 }
158
159 public TextWriter& operator<<(TextWriter& writer, const DateTime& dateTime)
160 {
161 writer.Write(dateTime);
162 return writer;
163 }
164
165 public TextWriter& operator<<(TextWriter& writer, char x)
166 {
167 writer.Write(x);
168 return writer;
169 }
170
171 public TextWriter& operator<<(TextWriter& writer, wchar x)
172 {
173 writer.Write(x);
174 return writer;
175 }
176
177 public TextWriter& operator<<(TextWriter& writer, uchar x)
178 {
179 writer.Write(x);
180 return writer;
181 }
182
183 public TextWriter& operator<<(TextWriter& writer, const Endl&)
184 {
185 writer.WriteLine();
186 return writer;
187 }
188 }