Difference between revisions of "API:TextWriter"
From Kerbal Space Program Wiki
(Created page with "{{Namespace:KSP.IO}} {{Class |name=TextWriter |summary=Identical to System.IO.TextWriter, but with added IDisposable methods (for use in using() statements), and a factory met...") |
|||
(One intermediate revision by the same user not shown) | |||
Line 4: | Line 4: | ||
|summary=Identical to System.IO.TextWriter, but with added IDisposable methods (for use in using() statements), and a factory method instead of constructors. | |summary=Identical to System.IO.TextWriter, but with added IDisposable methods (for use in using() statements), and a factory method instead of constructors. | ||
}} | }} | ||
+ | {{PropertiesStart}} | ||
+ | {{Property | ||
+ | |type=string | ||
+ | |name=NewLine | ||
+ | |desc= | ||
+ | |hasget=1 | ||
+ | |hasset=1 | ||
+ | }} | ||
+ | {{Property | ||
+ | |type=Encoding | ||
+ | |name=Encoding | ||
+ | |desc= | ||
+ | |hasget=1 | ||
+ | |hasset= | ||
+ | }} | ||
+ | {{Property | ||
+ | |type=IFormatProvider | ||
+ | |name=FormatProvider | ||
+ | |desc= | ||
+ | |hasget=1 | ||
+ | |hasset= | ||
+ | }} | ||
+ | {{PropertiesEnd}} | ||
{{MethodsStart}} | {{MethodsStart}} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
{{StaticMethod | {{StaticMethod | ||
|returntype=TextWriter | |returntype=TextWriter | ||
|returndesc= | |returndesc= | ||
|name=CreateForType<T> | |name=CreateForType<T> | ||
− | |args=string filename, Vessel flight = null | + | |args={{arg|string|filename}}, {{arg|Vessel|flight|default=null}} |
− | |desc=Create a | + | |desc=Create a text writing stream |
}} | }} | ||
{{Method | {{Method | ||
|returntype=void | |returntype=void | ||
|returndesc= | |returndesc= | ||
− | |name= | + | |name=WriteLine |
|args= | |args= | ||
− | |desc= | + | |desc= |
}} | }} | ||
{{Method | {{Method | ||
|returntype=void | |returntype=void | ||
|returndesc= | |returndesc= | ||
− | |name= | + | |name=Write |
− | |args= | + | |args={{arg|string|value}} |
+ | |desc= | ||
}} | }} | ||
{{Method | {{Method | ||
Line 35: | Line 53: | ||
|returndesc= | |returndesc= | ||
|name=Write | |name=Write | ||
− | |args= | + | |args={{arg|ulong|value}} |
+ | |desc= | ||
+ | }} | ||
+ | {{Method | ||
+ | |returntype=void | ||
+ | |returndesc= | ||
+ | |name=Close | ||
+ | |args= | ||
+ | |desc= | ||
}} | }} | ||
{{Method | {{Method | ||
Line 41: | Line 67: | ||
|returndesc= | |returndesc= | ||
|name=Write | |name=Write | ||
− | |args= | + | |args={{arg|object|value}} |
+ | |desc= | ||
}} | }} | ||
{{Method | {{Method | ||
|returntype=void | |returntype=void | ||
|returndesc= | |returndesc= | ||
− | |name= | + | |name=WriteLine |
− | |args= | + | |args={{arg|long|value}} |
+ | |desc= | ||
}} | }} | ||
{{Method | {{Method | ||
|returntype=void | |returntype=void | ||
|returndesc= | |returndesc= | ||
− | |name= | + | |name=WriteLine |
− | |args= | + | |args={{arg|string|format}}, {{arg|object|arg0}} |
+ | |desc= | ||
}} | }} | ||
{{Method | {{Method | ||
|returntype=void | |returntype=void | ||
|returndesc= | |returndesc= | ||
− | |name= | + | |name=WriteLine |
− | |args= | + | |args={{arg|string|format}} |
+ | |desc= | ||
}} | }} | ||
{{Method | {{Method | ||
|returntype=void | |returntype=void | ||
|returndesc= | |returndesc= | ||
− | |name= | + | |name=WriteLine |
− | |args= | + | |args={{arg|decimal|value}} |
+ | |desc= | ||
}} | }} | ||
{{Method | {{Method | ||
|returntype=void | |returntype=void | ||
|returndesc= | |returndesc= | ||
− | |name= | + | |name=WriteLine |
− | |args= | + | |args={{arg|bool|value}} |
+ | |desc= | ||
}} | }} | ||
{{Method | {{Method | ||
|returntype=void | |returntype=void | ||
|returndesc= | |returndesc= | ||
− | |name= | + | |name=WriteLine |
− | |args= | + | |args={{arg|char|value}} |
+ | |desc= | ||
}} | }} | ||
{{Method | {{Method | ||
|returntype=void | |returntype=void | ||
|returndesc= | |returndesc= | ||
− | |name= | + | |name=WriteLine |
− | |args= | + | |args={{arg|double|value}} |
+ | |desc= | ||
}} | }} | ||
{{Method | {{Method | ||
Line 89: | Line 123: | ||
|returndesc= | |returndesc= | ||
|name=Write | |name=Write | ||
− | |args= | + | |args={{arg|char|buffer|array=[]}} |
+ | |desc= | ||
}} | }} | ||
{{Method | {{Method | ||
|returntype=void | |returntype=void | ||
|returndesc= | |returndesc= | ||
− | |name= | + | |name=WriteLine |
− | |args= | + | |args={{arg|char|buffer|array=[]}}, {{arg|int|index}}, {{arg|int|count}} |
+ | |desc= | ||
}} | }} | ||
{{Method | {{Method | ||
|returntype=void | |returntype=void | ||
|returndesc= | |returndesc= | ||
− | |name= | + | |name=Flush |
− | |args= | + | |args= |
+ | |desc= | ||
}} | }} | ||
{{Method | {{Method | ||
Line 107: | Line 144: | ||
|returndesc= | |returndesc= | ||
|name=Write | |name=Write | ||
− | |args= | + | |args={{arg|double|value}} |
+ | |desc= | ||
}} | }} | ||
{{Method | {{Method | ||
Line 113: | Line 151: | ||
|returndesc= | |returndesc= | ||
|name=Write | |name=Write | ||
− | |args= | + | |args={{arg|decimal|value}} |
+ | |desc= | ||
}} | }} | ||
{{Method | {{Method | ||
Line 119: | Line 158: | ||
|returndesc= | |returndesc= | ||
|name=Write | |name=Write | ||
− | |args= | + | |args={{arg|string|format}}, {{arg|object|arg0}}, {{arg|object|arg1}} |
+ | |desc= | ||
}} | }} | ||
{{Method | {{Method | ||
Line 125: | Line 165: | ||
|returndesc= | |returndesc= | ||
|name=Write | |name=Write | ||
− | |args= | + | |args={{arg|uint|value}} |
+ | |desc= | ||
}} | }} | ||
{{Method | {{Method | ||
Line 131: | Line 172: | ||
|returndesc= | |returndesc= | ||
|name=Write | |name=Write | ||
− | |args= | + | |args={{arg|int|value}} |
+ | |desc= | ||
}} | }} | ||
{{Method | {{Method | ||
|returntype=void | |returntype=void | ||
|returndesc= | |returndesc= | ||
− | |name= | + | |name=Write |
− | |args= | + | |args={{arg|string|format}}, {{arg|object|arg0}}, {{arg|object|arg1}}, {{arg|object|arg2}} |
+ | |desc= | ||
}} | }} | ||
{{Method | {{Method | ||
Line 143: | Line 186: | ||
|returndesc= | |returndesc= | ||
|name=WriteLine | |name=WriteLine | ||
− | |args= | + | |args={{arg|ulong|value}} |
+ | |desc= | ||
}} | }} | ||
{{Method | {{Method | ||
Line 149: | Line 193: | ||
|returndesc= | |returndesc= | ||
|name=WriteLine | |name=WriteLine | ||
− | |args= | + | |args={{arg|object|value}} |
+ | |desc= | ||
}} | }} | ||
{{Method | {{Method | ||
|returntype=void | |returntype=void | ||
|returndesc= | |returndesc= | ||
− | |name= | + | |name=Write |
− | |args=char[] | + | |args={{arg|char|buffer|array=[]}}, {{arg|int|index}}, {{arg|int|count}} |
+ | |desc= | ||
}} | }} | ||
{{Method | {{Method | ||
Line 161: | Line 207: | ||
|returndesc= | |returndesc= | ||
|name=WriteLine | |name=WriteLine | ||
− | |args= | + | |args={{arg|string|format}}, {{arg|object|arg0}}, {{arg|object|arg1}} |
+ | |desc= | ||
}} | }} | ||
{{Method | {{Method | ||
Line 167: | Line 214: | ||
|returndesc= | |returndesc= | ||
|name=WriteLine | |name=WriteLine | ||
− | |args= | + | |args={{arg|float|value}} |
+ | |desc= | ||
}} | }} | ||
{{Method | {{Method | ||
Line 173: | Line 221: | ||
|returndesc= | |returndesc= | ||
|name=WriteLine | |name=WriteLine | ||
− | |args= | + | |args={{arg|string|format}}, {{arg|object|arg0}}, {{arg|object|arg1}}, {{arg|object|arg2}} |
+ | |desc= | ||
}} | }} | ||
{{Method | {{Method | ||
|returntype=void | |returntype=void | ||
|returndesc= | |returndesc= | ||
− | |name= | + | |name=Write |
− | |args= | + | |args={{arg|float|value}} |
+ | |desc= | ||
}} | }} | ||
{{Method | {{Method | ||
|returntype=void | |returntype=void | ||
|returndesc= | |returndesc= | ||
− | |name= | + | |name=Write |
− | |args= | + | |args={{arg|char|value}} |
+ | |desc= | ||
}} | }} | ||
{{Method | {{Method | ||
Line 191: | Line 242: | ||
|returndesc= | |returndesc= | ||
|name=WriteLine | |name=WriteLine | ||
− | |args= | + | |args={{arg|char|buffer|array=[]}} |
+ | |desc= | ||
}} | }} | ||
{{Method | {{Method | ||
Line 197: | Line 249: | ||
|returndesc= | |returndesc= | ||
|name=WriteLine | |name=WriteLine | ||
− | |args=string value | + | |args={{arg|string|value}} |
+ | |desc= | ||
}} | }} | ||
{{Method | {{Method | ||
|returntype=void | |returntype=void | ||
|returndesc= | |returndesc= | ||
− | |name= | + | |name=Write |
− | |args= | + | |args={{arg|string|format}} |
+ | |desc= | ||
}} | }} | ||
{{Method | {{Method | ||
|returntype=void | |returntype=void | ||
|returndesc= | |returndesc= | ||
− | |name= | + | |name=Write |
− | |args= | + | |args={{arg|bool|value}} |
+ | |desc= | ||
}} | }} | ||
{{Method | {{Method | ||
Line 215: | Line 270: | ||
|returndesc= | |returndesc= | ||
|name=WriteLine | |name=WriteLine | ||
− | |args= | + | |args={{arg|uint|value}} |
+ | |desc= | ||
}} | }} | ||
{{Method | {{Method | ||
|returntype=void | |returntype=void | ||
|returndesc= | |returndesc= | ||
− | |name= | + | |name=Dispose |
− | |args= | + | |args= |
+ | |desc= | ||
}} | }} | ||
{{Method | {{Method | ||
Line 227: | Line 284: | ||
|returndesc= | |returndesc= | ||
|name=WriteLine | |name=WriteLine | ||
− | |args= | + | |args={{arg|int|value}} |
+ | |desc= | ||
}} | }} | ||
{{Method | {{Method | ||
|returntype=void | |returntype=void | ||
|returndesc= | |returndesc= | ||
− | |name= | + | |name=Write |
− | |args= | + | |args={{arg|long|value}} |
+ | |desc= | ||
}} | }} | ||
{{Method | {{Method | ||
|returntype=void | |returntype=void | ||
|returndesc= | |returndesc= | ||
− | |name= | + | |name=Write |
− | |args=string format, object arg0 | + | |args={{arg|string|format}}, {{arg|object|arg0}} |
+ | |desc= | ||
}} | }} | ||
{{MethodsEnd}} | {{MethodsEnd}} |
Latest revision as of 23:08, 12 October 2012
KSP.IO Namespace
BinaryReader ·
BinaryWriter ·
File ·
FileInfo ·
FileStream ·
IOException ·
IOTools ·
IOUtils ·
MemoryStream ·
PluginConfigNode ·
PluginConfiguration ·
TextReader ·
TextWriter
TextWriter Class
Identical to System.IO.TextWriter, but with added IDisposable methods (for use in using() statements), and a factory method instead of constructors.
Properties
The following are public properties available in TextWriter.
Signature | Description |
---|---|
string NewLine { get; set; } | |
Encoding Encoding { get; } | |
IFormatProvider FormatProvider { get; } |
Methods
The following are methods included in TextWriter.
Signature | Description |
---|---|
static TextWriter CreateForType<T>(string filename, Vessel flight = null) | Create a text writing stream |
void WriteLine() | |
void Write(string value) | |
void Write(ulong value) | |
void Close() | |
void Write(object value) | |
void WriteLine(long value) | |
void WriteLine(string format, object arg0) | |
void WriteLine(string format) | |
void WriteLine(decimal value) | |
void WriteLine(bool value) | |
void WriteLine(char value) | |
void WriteLine(double value) | |
void Write(char[] buffer) | |
void WriteLine(char[] buffer, int index, int count) | |
void Flush() | |
void Write(double value) | |
void Write(decimal value) | |
void Write(string format, object arg0, object arg1) | |
void Write(uint value) | |
void Write(int value) | |
void Write(string format, object arg0, object arg1, object arg2) | |
void WriteLine(ulong value) | |
void WriteLine(object value) | |
void Write(char[] buffer, int index, int count) | |
void WriteLine(string format, object arg0, object arg1) | |
void WriteLine(float value) | |
void WriteLine(string format, object arg0, object arg1, object arg2) | |
void Write(float value) | |
void Write(char value) | |
void WriteLine(char[] buffer) | |
void WriteLine(string value) | |
void Write(string format) | |
void Write(bool value) | |
void WriteLine(uint value) | |
void Dispose() | |
void WriteLine(int value) | |
void Write(long value) | |
void Write(string format, object arg0) |