Class StreamWriterUtility
This utility class is designed to make System.IO.StreamWriter related operations easier to work with.
Inheritance
Namespace: Cuemon.IO
Assembly: Cuemon.IO.dll
Syntax
public static class StreamWriterUtility
Methods
| Improve this DocCreateStream(Action<StreamWriter>, Action<StreamWriterOptions>)
Creates and returns a System.IO.Stream by the specified delegate writer
.
Declaration
public static Stream CreateStream(Action<StreamWriter> writer, Action<StreamWriterOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.Action<System.IO.StreamWriter> | writer | The delegate that will create an in-memory System.IO.Stream. |
System.Action<StreamWriterOptions> | setup | The StreamWriterOptions which need to be configured. |
Returns
Type | Description |
---|---|
System.IO.Stream | A System.IO.Stream holding the content created by the delegate |
CreateStream<T>(Action<StreamWriter, T>, T, Action<StreamWriterOptions>)
Creates and returns a System.IO.Stream by the specified delegate writer
.
Declaration
public static Stream CreateStream<T>(Action<StreamWriter, T> writer, T arg, Action<StreamWriterOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.Action<System.IO.StreamWriter, T> | writer | The delegate that will create an in-memory System.IO.Stream. |
T | arg | The parameter of the delegate |
System.Action<StreamWriterOptions> | setup | The StreamWriterOptions which need to be configured. |
Returns
Type | Description |
---|---|
System.IO.Stream | A System.IO.Stream holding the content created by the delegate |
Type Parameters
Name | Description |
---|---|
T | The type of the parameter of the delegate |
CreateStream<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(Action<StreamWriter, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, Action<StreamWriterOptions>)
Creates and returns a System.IO.Stream by the specified delegate writer
.
Declaration
public static Stream CreateStream<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(Action<StreamWriter, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> writer, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, T10 arg10, Action<StreamWriterOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.Action<System.IO.StreamWriter, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> | writer | The delegate that will create an in-memory System.IO.Stream. |
T1 | arg1 | The first parameter of the delegate |
T2 | arg2 | The second parameter of the delegate |
T3 | arg3 | The third parameter of the delegate |
T4 | arg4 | The fourth parameter of the delegate |
T5 | arg5 | The fifth parameter of the delegate |
T6 | arg6 | The sixth parameter of the delegate |
T7 | arg7 | The seventh parameter of the delegate |
T8 | arg8 | The eighth parameter of the delegate |
T9 | arg9 | The ninth parameter of the delegate |
T10 | arg10 | The tenth parameter of the delegate |
System.Action<StreamWriterOptions> | setup | The StreamWriterOptions which need to be configured. |
Returns
Type | Description |
---|---|
System.IO.Stream | A System.IO.Stream holding the content created by the delegate |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first parameter of the delegate |
T2 | The type of the second parameter of the delegate |
T3 | The type of the third parameter of the delegate |
T4 | The type of the fourth parameter of the delegate |
T5 | The type of the fifth parameter of the delegate |
T6 | The type of the sixth parameter of the delegate |
T7 | The type of the seventh parameter of the delegate |
T8 | The type of the eighth parameter of the delegate |
T9 | The type of the ninth parameter of the delegate |
T10 | The type of the tenth parameter of the delegate |
CreateStream<T1, T2>(Action<StreamWriter, T1, T2>, T1, T2, Action<StreamWriterOptions>)
Creates and returns a System.IO.Stream by the specified delegate writer
.
Declaration
public static Stream CreateStream<T1, T2>(Action<StreamWriter, T1, T2> writer, T1 arg1, T2 arg2, Action<StreamWriterOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.Action<System.IO.StreamWriter, T1, T2> | writer | The delegate that will create an in-memory System.IO.Stream. |
T1 | arg1 | The first parameter of the delegate |
T2 | arg2 | The second parameter of the delegate |
System.Action<StreamWriterOptions> | setup | The StreamWriterOptions which need to be configured. |
Returns
Type | Description |
---|---|
System.IO.Stream | A System.IO.Stream holding the content created by the delegate |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first parameter of the delegate |
T2 | The type of the second parameter of the delegate |
CreateStream<T1, T2, T3>(Action<StreamWriter, T1, T2, T3>, T1, T2, T3, Action<StreamWriterOptions>)
Creates and returns a System.IO.Stream by the specified delegate writer
.
Declaration
public static Stream CreateStream<T1, T2, T3>(Action<StreamWriter, T1, T2, T3> writer, T1 arg1, T2 arg2, T3 arg3, Action<StreamWriterOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.Action<System.IO.StreamWriter, T1, T2, T3> | writer | The delegate that will create an in-memory System.IO.Stream. |
T1 | arg1 | The first parameter of the delegate |
T2 | arg2 | The second parameter of the delegate |
T3 | arg3 | The third parameter of the delegate |
System.Action<StreamWriterOptions> | setup | The StreamWriterOptions which need to be configured. |
Returns
Type | Description |
---|---|
System.IO.Stream | A System.IO.Stream holding the content created by the delegate |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first parameter of the delegate |
T2 | The type of the second parameter of the delegate |
T3 | The type of the third parameter of the delegate |
CreateStream<T1, T2, T3, T4>(Action<StreamWriter, T1, T2, T3, T4>, T1, T2, T3, T4, Action<StreamWriterOptions>)
Creates and returns a System.IO.Stream by the specified delegate writer
.
Declaration
public static Stream CreateStream<T1, T2, T3, T4>(Action<StreamWriter, T1, T2, T3, T4> writer, T1 arg1, T2 arg2, T3 arg3, T4 arg4, Action<StreamWriterOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.Action<System.IO.StreamWriter, T1, T2, T3, T4> | writer | The delegate that will create an in-memory System.IO.Stream. |
T1 | arg1 | The first parameter of the delegate |
T2 | arg2 | The second parameter of the delegate |
T3 | arg3 | The third parameter of the delegate |
T4 | arg4 | The fourth parameter of the delegate |
System.Action<StreamWriterOptions> | setup | The StreamWriterOptions which need to be configured. |
Returns
Type | Description |
---|---|
System.IO.Stream | A System.IO.Stream holding the content created by the delegate |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first parameter of the delegate |
T2 | The type of the second parameter of the delegate |
T3 | The type of the third parameter of the delegate |
T4 | The type of the fourth parameter of the delegate |
CreateStream<T1, T2, T3, T4, T5>(Action<StreamWriter, T1, T2, T3, T4, T5>, T1, T2, T3, T4, T5, Action<StreamWriterOptions>)
Creates and returns a System.IO.Stream by the specified delegate writer
.
Declaration
public static Stream CreateStream<T1, T2, T3, T4, T5>(Action<StreamWriter, T1, T2, T3, T4, T5> writer, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, Action<StreamWriterOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.Action<System.IO.StreamWriter, T1, T2, T3, T4, T5> | writer | The delegate that will create an in-memory System.IO.Stream. |
T1 | arg1 | The first parameter of the delegate |
T2 | arg2 | The second parameter of the delegate |
T3 | arg3 | The third parameter of the delegate |
T4 | arg4 | The fourth parameter of the delegate |
T5 | arg5 | The fifth parameter of the delegate |
System.Action<StreamWriterOptions> | setup | The StreamWriterOptions which need to be configured. |
Returns
Type | Description |
---|---|
System.IO.Stream | A System.IO.Stream holding the content created by the delegate |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first parameter of the delegate |
T2 | The type of the second parameter of the delegate |
T3 | The type of the third parameter of the delegate |
T4 | The type of the fourth parameter of the delegate |
T5 | The type of the fifth parameter of the delegate |
CreateStream<T1, T2, T3, T4, T5, T6>(Action<StreamWriter, T1, T2, T3, T4, T5, T6>, T1, T2, T3, T4, T5, T6, Action<StreamWriterOptions>)
Creates and returns a System.IO.Stream by the specified delegate writer
.
Declaration
public static Stream CreateStream<T1, T2, T3, T4, T5, T6>(Action<StreamWriter, T1, T2, T3, T4, T5, T6> writer, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, Action<StreamWriterOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.Action<System.IO.StreamWriter, T1, T2, T3, T4, T5, T6> | writer | The delegate that will create an in-memory System.IO.Stream. |
T1 | arg1 | The first parameter of the delegate |
T2 | arg2 | The second parameter of the delegate |
T3 | arg3 | The third parameter of the delegate |
T4 | arg4 | The fourth parameter of the delegate |
T5 | arg5 | The fifth parameter of the delegate |
T6 | arg6 | The sixth parameter of the delegate |
System.Action<StreamWriterOptions> | setup | The StreamWriterOptions which need to be configured. |
Returns
Type | Description |
---|---|
System.IO.Stream | A System.IO.Stream holding the content created by the delegate |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first parameter of the delegate |
T2 | The type of the second parameter of the delegate |
T3 | The type of the third parameter of the delegate |
T4 | The type of the fourth parameter of the delegate |
T5 | The type of the fifth parameter of the delegate |
T6 | The type of the sixth parameter of the delegate |
CreateStream<T1, T2, T3, T4, T5, T6, T7>(Action<StreamWriter, T1, T2, T3, T4, T5, T6, T7>, T1, T2, T3, T4, T5, T6, T7, Action<StreamWriterOptions>)
Creates and returns a System.IO.Stream by the specified delegate writer
.
Declaration
public static Stream CreateStream<T1, T2, T3, T4, T5, T6, T7>(Action<StreamWriter, T1, T2, T3, T4, T5, T6, T7> writer, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, Action<StreamWriterOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.Action<System.IO.StreamWriter, T1, T2, T3, T4, T5, T6, T7> | writer | The delegate that will create an in-memory System.IO.Stream. |
T1 | arg1 | The first parameter of the delegate |
T2 | arg2 | The second parameter of the delegate |
T3 | arg3 | The third parameter of the delegate |
T4 | arg4 | The fourth parameter of the delegate |
T5 | arg5 | The fifth parameter of the delegate |
T6 | arg6 | The sixth parameter of the delegate |
T7 | arg7 | The seventh parameter of the delegate |
System.Action<StreamWriterOptions> | setup | The StreamWriterOptions which need to be configured. |
Returns
Type | Description |
---|---|
System.IO.Stream | A System.IO.Stream holding the content created by the delegate |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first parameter of the delegate |
T2 | The type of the second parameter of the delegate |
T3 | The type of the third parameter of the delegate |
T4 | The type of the fourth parameter of the delegate |
T5 | The type of the fifth parameter of the delegate |
T6 | The type of the sixth parameter of the delegate |
T7 | The type of the seventh parameter of the delegate |
CreateStream<T1, T2, T3, T4, T5, T6, T7, T8>(Action<StreamWriter, T1, T2, T3, T4, T5, T6, T7, T8>, T1, T2, T3, T4, T5, T6, T7, T8, Action<StreamWriterOptions>)
Creates and returns a System.IO.Stream by the specified delegate writer
.
Declaration
public static Stream CreateStream<T1, T2, T3, T4, T5, T6, T7, T8>(Action<StreamWriter, T1, T2, T3, T4, T5, T6, T7, T8> writer, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, Action<StreamWriterOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.Action<System.IO.StreamWriter, T1, T2, T3, T4, T5, T6, T7, T8> | writer | The delegate that will create an in-memory System.IO.Stream. |
T1 | arg1 | The first parameter of the delegate |
T2 | arg2 | The second parameter of the delegate |
T3 | arg3 | The third parameter of the delegate |
T4 | arg4 | The fourth parameter of the delegate |
T5 | arg5 | The fifth parameter of the delegate |
T6 | arg6 | The sixth parameter of the delegate |
T7 | arg7 | The seventh parameter of the delegate |
T8 | arg8 | The eighth parameter of the delegate |
System.Action<StreamWriterOptions> | setup | The StreamWriterOptions which need to be configured. |
Returns
Type | Description |
---|---|
System.IO.Stream | A System.IO.Stream holding the content created by the delegate |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first parameter of the delegate |
T2 | The type of the second parameter of the delegate |
T3 | The type of the third parameter of the delegate |
T4 | The type of the fourth parameter of the delegate |
T5 | The type of the fifth parameter of the delegate |
T6 | The type of the sixth parameter of the delegate |
T7 | The type of the seventh parameter of the delegate |
T8 | The type of the eighth parameter of the delegate |
CreateStream<T1, T2, T3, T4, T5, T6, T7, T8, T9>(Action<StreamWriter, T1, T2, T3, T4, T5, T6, T7, T8, T9>, T1, T2, T3, T4, T5, T6, T7, T8, T9, Action<StreamWriterOptions>)
Creates and returns a System.IO.Stream by the specified delegate writer
.
Declaration
public static Stream CreateStream<T1, T2, T3, T4, T5, T6, T7, T8, T9>(Action<StreamWriter, T1, T2, T3, T4, T5, T6, T7, T8, T9> writer, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7, T8 arg8, T9 arg9, Action<StreamWriterOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.Action<System.IO.StreamWriter, T1, T2, T3, T4, T5, T6, T7, T8, T9> | writer | The delegate that will create an in-memory System.IO.Stream. |
T1 | arg1 | The first parameter of the delegate |
T2 | arg2 | The second parameter of the delegate |
T3 | arg3 | The third parameter of the delegate |
T4 | arg4 | The fourth parameter of the delegate |
T5 | arg5 | The fifth parameter of the delegate |
T6 | arg6 | The sixth parameter of the delegate |
T7 | arg7 | The seventh parameter of the delegate |
T8 | arg8 | The eighth parameter of the delegate |
T9 | arg9 | The ninth parameter of the delegate |
System.Action<StreamWriterOptions> | setup | The StreamWriterOptions which need to be configured. |
Returns
Type | Description |
---|---|
System.IO.Stream | A System.IO.Stream holding the content created by the delegate |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first parameter of the delegate |
T2 | The type of the second parameter of the delegate |
T3 | The type of the third parameter of the delegate |
T4 | The type of the fourth parameter of the delegate |
T5 | The type of the fifth parameter of the delegate |
T6 | The type of the sixth parameter of the delegate |
T7 | The type of the seventh parameter of the delegate |
T8 | The type of the eighth parameter of the delegate |
T9 | The type of the ninth parameter of the delegate |