BasePropertyWriteToStream 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: 2023.1.2.0
public static void WriteToStream(
	BaseProperty prop,
	StringBuilder sb,
	TextWriter tw
)

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

InvalidCastExceptionThis is thrown if the StringBuilder parameter is null and the TextWriter is not a StringWriter.

See Also