Base PropertyWrite To Stream Method
This is a helper method that converts a property to its string form and writes it to the given text
writer.
Definition
Namespace: EWSoftware.PDI.Properties
Assembly: EWSoftware.PDI.Data (in EWSoftware.PDI.Data.dll) Version: 2025.1.9.0
Assembly: EWSoftware.PDI.Data (in EWSoftware.PDI.Data.dll) Version: 2025.1.9.0
C#
public static void WriteToStream(
BaseProperty? prop,
StringBuilder? sb,
TextWriter tw
)VB
Public Shared Sub WriteToStream (
prop As BaseProperty,
sb As StringBuilder,
tw As TextWriter
)C++
public:
static void WriteToStream(
BaseProperty^ prop,
StringBuilder^ sb,
TextWriter^ tw
)F#
static member WriteToStream :
prop : BaseProperty *
sb : StringBuilder *
tw : TextWriter -> unit Parameters
- prop BaseProperty
- The property to use.
- sb StringBuilder
A StringBuilder used by the property to convert itself to a string. This is a shared instance used by all properties written to the text writer. It is cleared before the specified property is converted.
It can be null if the TextWriter is a StringWriter. In that case, the property will append itself directly to its StringBuilder instead.
- tw TextWriter
- A TextWriter to which the string form is written.
Remarks
Properties use a StringBuilder to convert themselves to a string rather than writing
directly to the TextWriter as they may need to manipulate the string to fold lines, etc.
Exceptions
| InvalidCastException | This is thrown if the StringBuilder parameter is null and the TextWriter is not a StringWriter. |